use*_*666 2 scala performance-testing gatling
作为我的性能测试的一部分,我需要调试会话等.如果我删除,相同的代码正在运行session =>.当我添加它说它在模拟期间没有发送请求,因为它没有发送任何请求.
val scn1 = scenario("LaunchAction").exec{ session =>
http("Poll report status page report")
.get("myURL/rest/reports")
.queryParam("applicationId", "123")
.queryParam("id", "1")
.check(xpath("//status").saveAs("responseStatus"))
session
}
Run Code Online (Sandbox Code Playgroud)
我需要在它们之间添加一些打印件等.你能提供一些信息吗?
我刚刚开始使用Gatling,我遇到了同样的问题.最简单的调试方法是添加入口点对象,我通过运行main方法在本地启动/调试测试
object DebugEntrypoint {
def main(args: Array[String]) {
// This sets the class for the Simulation we want to run.
val simClass = classOf[Smoke].getName
val props = new GatlingPropertiesBuilder
props.sourcesDirectory("./src/test/scala")
props.binariesDirectory("./target/scala-2.10/classes")
props.simulationClass(simClass)
Gatling.fromMap(props.build)
}
}
Run Code Online (Sandbox Code Playgroud)
一旦从这里执行测试,我在模拟中放置的任何断点都将在运行时暂停执行.一旦遇到断点,您就可以评估表达式并在出价时使用所有其他调试工具.
| 归档时间: |
|
| 查看次数: |
973 次 |
| 最近记录: |