GenRocket does not directly rollback generated data because it depends on the framework of the given test or set of tests. 

Here are a few examples:

  • If GenRocket were generating data for a set of unit tests that are using a JUnit testing foundation (many programming language frameworks support JUnit. (e.g., Spring, Grails, Laravel, etc.), then the JUnit framework itself has a method that can be called directly or indirectly to rollback data just after each test run.

  • Within a given unit test, it is also possible to start a database transaction and simply not commit the transaction or roll back the transaction immediately after a test is completed.

  • When running Black Box functional tests, it is often desirable not to delete data after each run of a given test because the tests that are being run in a sequence are accumulative. Thus, a script may be used to make a call to the database to drop and create a given set of tables or to truncate a given set of tables; then call a GenRocket Scenario chain that will execute one or more Scenarios to repopulate the database. 

To summarize, GenRocket does not directly have a specific method to rollback generated data (and that's by design), so that it may work with any unit testing or test data generation framework and its paradigm for rolling back data.

Additional Information

For any questions regarding this topic, please raise a ticket to