一、问题:按照网上教程编写数据驱动文件后进行执行时,察看结果树无任何反应和提示:
PS:excel中params参数可以用"&"进行连接。
二、进入菜单栏,选项->日志查看打钩,查询到如下log信息:
2021-07-06 16:06:21,981 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2021-07-06 16:06:21,985 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2021-07-06 16:06:21,987 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*) 2021-07-06 16:06:22,082 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : 星座接口测试 2021-07-06 16:06:22,083 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group 星座接口测试. 2021-07-06 16:06:22,083 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error 2021-07-06 16:06:22,083 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false 2021-07-06 16:06:22,084 INFO o.a.j.t.ThreadGroup: Started thread group number 1 2021-07-06 16:06:22,084 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started 2021-07-06 16:06:22,085 INFO o.a.j.t.JMeterThread: Thread started: 星座接口测试 1-1 2021-07-06 16:06:22,085 INFO o.a.j.s.FileServer: Stored: C:/Users/Administrator/Desktop/ATest/star_api.csv 2021-07-06 16:06:22,559 INFO o.a.j.t.JMeterThread: Thread is done: 星座接口测试 1-1 2021-07-06 16:06:22,559 INFO o.a.j.t.JMeterThread: Thread finished: 星座接口测试 1-1 2021-07-06 16:06:22,560 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test 2021-07-06 16:06:22,560 INFO o.a.j.s.FileServer: Close: C:/Users/Administrator/Desktop/ATest/star_api.csv 2021-07-06 16:06:22,560 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
三、百度查询之后都是提示JAVA包导入问题。
四、查看唯一手动编写的文件就是if循环中的判断语句:
五、${_jexl3("${methods}"=="GET")}中jexl3前面是有两个_线的,补全后${__jexl3("${methods}"=="GET")}。
六、再次执行,结果树输出结果,问题解决:
PS:遇到结果树左侧Text区域中文乱码时,进入CSV数据文件设置中更改文件编码为:gb2312,再重新执行一次即可解决问题:
|