I am looking for a bit of advice here.
I am currently testing procedures that insert rows into tables.
To test a proc that say insert into table A (no commit)
I have, for each test case
- a.initialisation that creates the rows that must exist before the run, e…g. the parent row in table B of the row to insert into A
- b. the test case run
- c. cleanup: delete all rows created in a. and b.
When an error occurs in one of the tests (e.g 2 tests are successful, 1 fails) the cleanup step does not seem to happen and I have to delete all rows manually otherwise all tests start to fail
am I missing something here? Is it normal behaviour from the tool? Is it a good practice issue or an issue with the tool?
Is the solution to have the cleanup code repeated in the initialisation step for each test case?