Toad World® Forums

Strange problem with test rows being committed


#1

I found the problem (I think) - so I don;t need help on this one.

I have a test case which insert a row into a table in the Initialization section of the Custom code, then runs a test, then checks a value in the table. The test case is set to do rollbacks before and after the test. Here’s what happening:

  1. The test fails because an output condition does a select to find the row that was inserted, but it does not find it.
  2. After the test case is completed, I check the DB table, and the row I inserted is there!
  3. I put a DELETE in both the Post Execution section and the Cleanup section, but it is ignored.

I have written quite a few other test cases, and this is the only one where the data inserted/updated/deleted persists after the test is completed, and is not seen dueing the execution of the test. I have deleted and recreated the test 3 times from scratch, only to see the same behavior each time. Does anyone have any idea as to what could be happening here?

Message was edited by: Harris


#2

Are you sure your program does not do a commit?

Have you written any customization code?

SF


#3

Hello

Sorry for digging this 3 year old thread up. But I encountered this behavior also a few times in the latest release of Code Tester. I inserted some test data in a table. When the test is OK, the test data is removed because I keep the default settings (rollback before and after the test). But when there is an error in my test the test data is committed to the database (which can be annoying when you insert a bunch of test data). I’m also 100% sure that there’s no commit statement in my procedures and functions.

NielsC


#4

Hello NielsC,
We will look at this enhancement for our next release, post v2.6.

Thank you,
Olga.


#5

NielsC, could you please send the source code of your test package to me at steven.feuerstein@quest.com, and I will take a look?

Thanks, SF


#6

Steven

I’ve sent you the test package.

NielsC


#7

I am unable to see anything in the test code that might cause this and I cannot reproduce. So…it’s time for Support! Please make a copy of and trim down the test definition to the minimum number of “moving parts” (test cases, tables, etc.) that still reproduce the problem. Then log a bug with Quest Support and let’s get to the bottom of this.


#8

Steven

Do you mean that I need to create a support bundle?

NielsC


#9

That’s the easiest way to go. Make sure you specify the name of the program whose test definition and code we need to see. CT will then “load it all up”.

Right, but then you should register an issue with support.quest.com and load up the bundle with that issue.

You can also feel free to email it to me and I will take a look right away.

Message was edited by: stevenfeuerstein


#10

FYI - NielsC has notified me that he is now unable to reproduce the problem.