Commit Rollback Database Auto Tests

When you test with TestFixtures, on database-facing code, you need light fast database records.

Test cases use database records like the beads in the left panel (from ModelViewController); smaller beads are leaf records. As tests run, the records must flicker in and out. Some tests might test the database is naively empty, and so on.

Each test case...

In all my decades coding have not yet seen that work correctly in auto test runners. Because...

You can't change transaction isolation levels with a transaction open.

[I don't think that's it. I can't speak for other code, but the RelProject successfully uses extensive tests like the above -- nearly 500 at last count.]


EditText of this page (last edited June 27, 2013) or FindPage with title or text search