如何在没有 sbt 命令的情况下 debug/run 在 IntelliJ IDEA 中进行单个 gatling 模拟?
How to debug/run a single gatling simulation in IntelliJ IDEA without sbt command?
我如何调试或 运行 BasicSimulation.scala?
现在我使用 sbt 命令 运行:
testOnly simulations:BasicSimulation
还有其他简单的调试方法吗?谢谢
如果你想 运行 在 intellij 中进行 gatling 测试,你可以在左上角的 运行 工具栏中进入编辑配置并添加一个新的 sbt 任务。
在任务字段中输入 testOnly simulations:BasicSimulation
即可。
通常您应该可以通过单击调试按钮来调试它,但至少在我的配置中似乎无法进行 gatling 测试。
您可以通过右键单击->运行 添加一个简单的 class 和 运行。类似这里:https://github.com/puppetlabs/gatling-puppet-load-test/blob/master/simulation-runner/src/main/scala/com/puppetlabs/gatling/runner/PuppetGatlingRunner.scala
gatling 项目的官方文档页面中的一切都得到了很好的解释:
http://gatling.io/docs/2.2/extensions/maven_archetype/
只需使用他们的原型在 maven 中生成一个项目,然后导入任何体面的 IDE 和 voilà
根据实际文档,这样做是这样的:
gatling:testOnly *BasicSimulation*
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.
(我在 sbt 控制台测试过)
我如何调试或 运行 BasicSimulation.scala?
现在我使用 sbt 命令 运行:
testOnly simulations:BasicSimulation
还有其他简单的调试方法吗?谢谢
如果你想 运行 在 intellij 中进行 gatling 测试,你可以在左上角的 运行 工具栏中进入编辑配置并添加一个新的 sbt 任务。
在任务字段中输入 testOnly simulations:BasicSimulation
即可。
通常您应该可以通过单击调试按钮来调试它,但至少在我的配置中似乎无法进行 gatling 测试。
您可以通过右键单击->运行 添加一个简单的 class 和 运行。类似这里:https://github.com/puppetlabs/gatling-puppet-load-test/blob/master/simulation-runner/src/main/scala/com/puppetlabs/gatling/runner/PuppetGatlingRunner.scala
gatling 项目的官方文档页面中的一切都得到了很好的解释:
http://gatling.io/docs/2.2/extensions/maven_archetype/
只需使用他们的原型在 maven 中生成一个项目,然后导入任何体面的 IDE 和 voilà
根据实际文档,这样做是这样的:
gatling:testOnly *BasicSimulation*
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.
(我在 sbt 控制台测试过)