scala 如何在没有 sbt 命令的情况下在 IntelliJ IDEA 中调试/运行单个加特林模拟?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30346631/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 07:10:27  来源:igfitidea点击:

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

scalaintellij-ideagatling

提问by Ansen

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

我如何调试或运行 BasicSimulation.scala?现在我使用 sbt 命令运行: testOnly simulations:BasicSimulation还有其他简单的调试方法吗?谢谢。

采纳答案by Mykola Gurov

回答by sashok_bg

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

gatling 项目的官方文档页面中对所有内容都有很好的解释:

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

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à

只需使用他们的原型在 maven 中生成一个项目,然后导入任何像样的 IDE 和瞧

回答by Makis Arvanitis

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.

如果你想在intellij内部运行gatling测试,你可以去左上角运行工具栏中的编辑配置并添加一个新的sbt任务。

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

在任务字段上输入testOnly simulations:BasicSimulation,就是这样。

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.

通常您应该能够通过单击调试按钮来调试它,但至少在我的配置中似乎不可能进行加特林测试。