I've looked at the GenRocket website, which is great by the way, and was left wondering: does GenRocket come with an API that allows you to leverage the data generation capabilities in a set of automated tests (unit/integration/scenario)? Likewise, does it play well with a continous integration setup based on Maven/Ant/Gradle - does it ship with custom tasks or plugins?
The impression I got from looking at some demo material was that it ships with a seperate command-line utility that lets you invoke the GenRocket engine to load data sets - in this case into a MySQL table. I'd really love to be able to also invoke the GenRocket engine directly from inside my automated tests. That would be great, because I usually have a reference data set that all tests can depend on, which would be prepared ahead of the test run. Each individual test is then responsible for its own specific data needs. Preferably the test specific data will never actually get persisted, for instance by a transaction rollback at the end of a test. Can I easily integrate the reference data preperation into the build lifecycle? Can I invoke the GenRocket engine to generate test specific data on-demand from inside my test code?
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Currently, GenRocket doesn't ship with any plugins that plug directly into any automation, build, or CI tools. Right now, there are basically 2 ways you can execute Scenarios.
First, as you eluded to, GenRocket ships with the GenRocket Runtime (setup instructions here) which allows you to execute Scenarios from the command line. For example:
Secondly, as a benefit to those engineers that chose to make the awesome decision to choose a JVM based platform for their project, you can add the GenRocket Runtime to your classpath and execute Scenarios directly from your code:
Although integrating better with build tools like Gradle and IDE's like IntelliJ or Eclipse is on our roadmap, integrating directly with test automation suites is pretty far out. At the end of the day, GenRocket generates data. Integrating with automation suites is usually as simple as doing one of the above solutions.