JMeter测试配置 [英] JMeter Testing Configuration

查看:164
本文介绍了JMeter测试配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用命令行将变量传递给Jmeter.如何读取此变量并将其设置为enabled属性.有没有办法做到这一点.基于从命令行传递的值(true或false),我想启用或禁用测试.

I am passing a variable using the command line to the Jmeter. How can I read this variable and set it to the enabled attribute. Is there a way to do it. Based on the value passed from the command line (either true or false) i want to enable or disable the test.

我正在使用 谢谢

推荐答案

您可以将"If controller"添加到"Thread group"的开头,将其条件设置为${__P(MY_TEST_CASE_ENABLED)}(其中MY_TEST_CASE_ENABLED传递给JMeter进程)使用-D选项),然后在该控制器内部添加带有立即停止"操作的测试操作"采样器.

You can add an "If controller" to the begining of your "Thread group", set its condition to ${__P(MY_TEST_CASE_ENABLED)} (where MY_TEST_CASE_ENABLED is passed to JMeter process using -D option) and inside that controller add "Test Action" sampler with "Stop now" action.

这篇关于JMeter测试配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆