We are using Selenium web services for our automated functional testing.
I have a test that tests the creation of some objects. If I run the same test again, I need to make sure that each test has a different business key - else it will run into a unique-constraint violation.
One way, I can fix this is to reset the database before\after every run of test suite so that each test suite doesn't conflict with another. However, my individual tests within the same run are not isolated from each other.
How do I get to the point, where all my tests are isolated and do not conflict with each other?
Right now we query the database to generate random IDs that do not exist in the database. But I am sure there must be a more elegant way of solving this.