nGrinder报There is no test in progress错误解决

背景

大周末,要开启一个稳定性的压力测试,脚本必须包含混合场景

问题

脚本都写完,调试过程中,日志打印能发起请求,并正确返回,但是有报错信息,报错如下:

2019-10-26 10:34:50,417 ERROR There is no test in progress.
net.grinder.script.InvalidContextException: There is no test in progress.
    at net.grinder.engine.process.ScriptStatisticsImplementation.getForCurrentTest(ScriptStatisticsImplementation.java:119) ~[grinder-core-3.9.1.jar:na]
    at HLS_Mix.test_AAA(HLS_Mix.groovy:124) ~[na:na]
    at net.grinder.scriptengine.groovy.junit.GrinderRunner.run(GrinderRunner.java:170) ~[ngrinder-groovy-3.4.1.jar:na]
    at net.grinder.scriptengine.groovy.GroovyScriptEngine$GroovyWorkerRunnable.run(GroovyScriptEngine.java:147) ~[ngrinder-groovy-3.4.1.jar:na]
    at net.grinder.engine.process.GrinderThread.run(GrinderThread.java:118) ~[grinder-core-3.9.1.jar:na]

解决方案

问题定位,发现是@BeforeThread里的test_AAA.record(this, "test_ccc)有问题,应该改为test_AAA.record(this, "test_AAA),问题顺利解决。

你可能感兴趣的:(nGrinder报There is no test in progress错误解决)