How to manage test data fixtures for acceptance testing in large projects? How to manage test data fixtures for acceptance testing in large projects? selenium selenium

How to manage test data fixtures for acceptance testing in large projects?


What you're describing is called a Sandbox DB. For every new deploy you'll have to provide/populate this DB with the data you need and after tests are done, to drop it.

have several versions/snapshots of DB state

This is what a Fresh Fixture pattern and Prebuilt Fixture pattern will help you with. Also you could look at the Fixture Teardown patterns.

Here you can find some considerations when dealing with such big-data-sandbox-strategies. Like scheduling, master data repository and monitoring.

To successfully manage all that - a CI server have to be put to work. Since you've tagged JAVA, a good options are:


What I understand your question is that you want to run your test cases with predefined data and don't populate something from database directly.

  1. Create database dumps for each version and store them
  2. Create Job (ex: on CI, a Jenkins, Hudson, ... job) which loads the test data base with required dumps. This should be automatically triggered after a successfull deployment to test server.
  3. Create a module/function for creating temporary test data
  4. Run your test cases (ideally successfull result of the job in step 2 should trigger this)