• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GenRocket: automated test integration

 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alright, so it is possible to run a scenario from inside an automated test at least. That's encouraging. Thanks Greg!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic