wood burning stoves 2.0*
The moose likes Testing and the fly likes GenRocket: automated test integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "GenRocket: automated test integration" Watch "GenRocket: automated test integration" New topic
Author

GenRocket: automated test integration

Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1761
    
    7

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.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Hey Jelle!

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.


GenRocket - Experts at Building Test Data
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1761
    
    7

Alright, so it is possible to run a scenario from inside an automated test at least. That's encouraging. Thanks Greg!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GenRocket: automated test integration