关于如何有条件地停止测试线程甚至整个测试,至少有两个选项:
- 将Test Action采样器与If Controller结合使用
- 使用Beanshell Sampler或PostProcessor并调用SampleResult类的setStopThread方法。例如,请参阅如何使用BeanShell指南。以供参考:
if (condition){SampleResult.setStopThread(true); // for Beanshell Samplerprev.setStopThread(true); // for Beanshell Post Processor}



