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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -