18
votes

How could I debug or run the BasicSimulation.scala? Now I use sbt command to run: testOnly simulations:BasicSimulation Is there any other easy way to debug? Thanks.

4
Add some more details. What's going wrong, why doesn't testOnly help you? etc.goralph

4 Answers

1
votes

If you want to run gatling tests inside the intellij, you can go to the edit configurations in the run toolbar on the top left and add a new sbt task.

On the task field enter testOnly simulations:BasicSimulation and that's it.

Normally you should be able to debug it by clicking the debug button, but it doesn't seems to be possible for the gatling tests at least in my configuration.

1
votes

Everything is nicely explained in the official documentation page of the gatling project:

http://gatling.io/docs/2.2/extensions/maven_archetype/

Just use their archetype to generate a project in maven and then import in any decent IDE and voilà

0
votes

According to actual documentation this is done like:

gatling:testOnly *BasicSimulation*

Here the Documentation

As with any SBT testing framework, you’ll be able to run Gatling simulations using SBT standard test, testOnly, testQuick, etc… tasks. However, since the SBT Plugin introduces many customizations that we don’t want interfering with unit tests, those commands are integrated into custom configurations, meaning you’ll need to prefix them with gatling or gatling-it, eg. gatling:test or gatling-it:test.

(I tested this in sbt console)