Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug/run a single gatling simulation in IntelliJ IDEA without sbt command?

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.

like image 898
Ansen Avatar asked May 20 '15 10:05

Ansen


People also ask

How do I debug Gatling in IntelliJ?

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.

How do I run a debug test in IntelliJ?

Open the test in the editor, press Ctrl+Shift+F10 or right-click on the test class and from the context menu select Run 'test name'. IntelliJ IDEA creates a run/debug configuration for the test automatically, but if you want to edit settings in your configuration, click Run | Edit Configurations on the main menu.


2 Answers

You can add a simple class and run it by right click->run . Something like here: https://github.com/puppetlabs/gatling-puppet-load-test/blob/master/simulation-runner/src/main/scala/com/puppetlabs/gatling/runner/PuppetGatlingRunner.scala

like image 176
Mykola Gurov Avatar answered Sep 28 '22 08:09

Mykola Gurov


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.

like image 32
Makis Arvanitis Avatar answered Sep 28 '22 07:09

Makis Arvanitis