jmeter
扫低地调
这个作者很懒,什么都没留下…
展开
-
JMeter获取请求的参数
import java.util.HashMap;String postdata = prev.getSamplerData();String[] after = postdata.split("[&]");//HashMap<String,String> map = new HashMap<>();Map map =new HashMap();for (int i = 0; i < after.length; i++) {String[] body = a原创 2020-11-13 14:01:39 · 476 阅读 · 0 评论 -
生成测试报告的两条,命令
jmeter -n -t test.jmx -l test.jtljmeter -g test.jtl -o report原创 2020-09-27 18:17:24 · 81 阅读 · 0 评论 -
jmeter替换响应结果
String json = prev.getResponseDataAsString();log.info(“json”+json);var response=json.replace("\","");prev.setResponseData(response,“UTF-8”);原创 2020-09-11 17:05:30 · 308 阅读 · 0 评论 -
Jmeter将接口的请求信息统计起来生成excel
import excelhelp.excel;path = ctx.getCurrentSampler(). getProperty(“HTTPSampler.path”);String spath=""+path;log.info(spath);method = ctx.getCurrentSampler(). getProperty(“HTTPSampler.method”);String smethod=""+method;log.info(smethod);name = ctx.get原创 2020-07-13 18:19:21 · 153 阅读 · 0 评论 -
Jmeter获取SamplerProperties
获取SamplerPropertiesimport excelhelp.excel;path = ctx.getCurrentSampler(). getProperty(“HTTPSampler.path”);String spath=""+path;log.info(spath);method = ctx.getCurrentSampler(). getProperty(“HTTPSampler.method”);String smethod=""+method;log.info(smet原创 2020-07-09 18:04:28 · 363 阅读 · 0 评论 -
jmeter线程传递参数
String userId=bsh.args[0];log.info("-----------------------"+userId);log.info("-----------------------"+"${token}");KaTeX parse error: Expected group after '_' at position 2: {_̲_setProperty(Pt…{token},000)};log.info("-----------------------"+"${__P(Pt原创 2020-07-02 18:05:14 · 93 阅读 · 0 评论