tdd - Database integration tests -


when doing integration tests either data access layer or majority of application stack. best way prevent multiple tests clashing each other if run on same database?

transactions.

what ruby on rails unit test framework this:

load fixture data.  each test:    begin transaction      # yield control user code    rollback transaction  end each 

this means that

  1. any changes test makes database won't affect other threads while it's in-progress
  2. the next test's data isn't polluted prior tests
  3. this zillion times faster manually reloading data each test.

i 1 think pretty cool


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -