So i've ran into a bit of a problem, I have a set of automated tests created for a site, were looking into really moving towards a CI based system for testing (Running the test suite after pushing features/etc...)
However in this site and a lot of my automated tests involve creating records in the database (through the site). Which is fine and everything, I mean these are features I WANT to exercise.
However....I can't just keep running the tests on the same database, the test data would just keep filling up! I could Delete the records from the database using the Websites ability to delete things, but that's insanely brittle and relies me going to an exact "Delete" button on a list to do that....seems like a poor idea. Plus if that automated test doesn't work, we get extra data...not good.
So how do I get around this?
Most of our sites are rails sites, i've looked into using Factories, but that doesn't really seem like it replicates doing a true integration test. So I could just recreate a database and reseed with test data before every automation suite run, or is this bad practice?
How do I get a good system running for test data in this scenario + moving forward?