In my application, I have a set of data which will be added initially. This data will then be used in the application. Eg employees will be added. This data will then be used in creating peojects,timesheets etc. So when I automate
1) do i just use the data available in the system
2) do i create a set of employees then use each for various scripts
3) do i just create an employee and use it in a script. delete and create it again for another script.
1.This is the easiest one, but them sometimes to hunt for the correct data is much more difficult.
2. This is ideal as you create your own data set for automation and a manual testing team or any other release team will in no way corrupt your data and the amount of overhead when compared to option 3 is less.
3.This is similar to second but go for this if you are bothered about populating the db with test data and if you find extra overhead in creation of bulk data.
If possible, you should try to:
- start with a logically "empty" data set
- using your automation suite, add the test employees, test projects, test timesheets, etc, perhaps through the User Interface of your application
- run your automated tests
- report the results
Leave the test data in place until after you have analyzed the results of the test and reported any problems.
Then next time you run your automated tests, back up the prior version, then start from an empty data set again.
That way, you have a dependable, repeatable baseline of test data each time.
Over time, you can enhance the automation which adds the test data to add more variants/flavors of data, allowing you to cover more and more test cases.