Programmatically invoking Gatling with dynamic scenarios

863 views
Skip to first unread message

James McGivern

unread,
May 7, 2015, 10:48:02 AM5/7/15
to gat...@googlegroups.com
Hi,

I want to use something like Cucumber JVM to drive performance tests written for Gatling.

Ideally the Cucumber features would somehow build a scenario dynamically - probably reusing predefined chain objects similar to the method described in the "Advanced Tutorial", e.g.

val scn = scenario("Scenario Name").exec(Search.search("foo"), Browse.browse, Edit.edit("foo", "bar")

I've looked at how the Maven plugin executes the scripts, and I've also seen mention of using an App trait but I can't find any documentation for the later and it strikes me that somebody else will have wanted to do this before...

Can anybody point (a Gatling noob) in the direction of some documentation or example code of how to achieve this?

Thanks
James

Stéphane LANDELLE

unread,
May 14, 2015, 4:44:32 PM5/14/15
to gat...@googlegroups.com
For the sake of sharing the information here, here's a copy of my answer on SOF:

"Sadly, it's not currently feasible to have Gatling directly start a Simulation instance.

Not that's it's not technically feasible, but you're just the first person to try to do this. Currently, Gatling is usually in charge of compiling and can only be passed the name of the class to load, not an instance itself.

You can maybe start by forking io.gatling.app.Gatling and io.gatling.core.runner.Runner, and then provide a PR to support this new behavior. The former is the main entry point, and the latter the one can instanciate and run the simulation."

Stéphane Landelle
Lead developer


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Geoff Dinsdale

unread,
May 18, 2015, 1:56:18 PM5/18/15
to gat...@googlegroups.com
I wrote a simulation generatior that uses gherkin feature files to define the test. The simulation is thus throwawa, however you do need objects in place for the requests
Reply all
Reply to author
Forward
0 new messages