当前位置:网站首页>JMeter test result output
JMeter test result output
2022-07-03 06:53:00 【God】
demand : Read parameter data from the document ,jmeter Print or save the results after execution
One 、 Get ready txt, Write input parameters , The format is : Parameters 1, Parameters 2
Two 、 stay jmeter Set parameterization in
3、 ... and 、 Add request
After setting the request , Then add the result tree , You can test run , Confirm whether the previous settings are correct , What is the return value
Four 、 Add a parameter extractor , Regular expression extractor or json Extractor
Here is the regular expression extractor
Here is json Extractor
5、 ... and 、 Write script of post processor
Here is the code
// Output the required test results
// Get the previous regular expression extractor or json Parameters obtained by the extractor
String a = vars.get("code");
String b = vars.get("msg");
// cmd Black window printing
System.out.println("system"+a);
//console Print
log.info("log"+a);
try{
// Save to local file , It can be txt/csv, You can also use the corresponding format when introducing other packages , Such as Excel
// If the following parameter value is true, Then write the data to the end of the file , Instead of writing to the beginning of the file
FileWriter fileWriter1 = new FileWriter("D:\\jmeter Test result output \\ Results output .csv",true);
FileWriter fileWriter2 = new FileWriter("D:\\jmeter Test result output \\ Results output .txt",true);
BufferedWriter out1 = new BufferedWriter(fileWriter1);
BufferedWriter out2 = new BufferedWriter(fileWriter2);
// txt in ‘,’ Splicing ,‘\n’ Line break ;csv in ‘,’ Next cell to the right ,‘\n’ Line break
out1.write(a+","+b+"\n");
out2.write(a+","+b+"\n");
out1.close();
out2.close();
fileWriter1.close();
fileWriter2.close();
} catch (IOException e) {
e.printStackTrace();
}
6、 ... and 、 Set the thread group parameters according to your needs , The results are shown in the following figure
end
边栏推荐
- These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products
- php安装swoole扩展
- Interface test weather API
- Troubleshooting of high CPU load but low CPU usage
- Ruoyi interface permission verification
- Winter vacation work of software engineering practice
- Sorting out the core ideas of the pyramid principle
- Code management tools
- Dbnet: real time scene text detection with differentiable binarization
- Opencv mouse and keyboard events
猜你喜欢
HMS core helps baby bus show high-quality children's digital content to global developers
New knowledge! The virtual machine network card causes your DNS resolution to slow down
The 10000 hour rule won't make you a master programmer, but at least it's a good starting point
[open source project recommendation colugomum] this group of undergraduates open source retail industry solutions based on the domestic deep learning framework paddlepadddle
【无标题】
[5g NR] UE registration process
Operation principle of lua on C: Foundation
每日刷题记录 (十一)
Paper notes vsalm literature review "a comprehensive survey of visual slam algorithms"
Software testing learning - day 3
随机推荐
Asynchronous programming: async/await in asp Net
pytorch练习小项目
每日刷题记录 (十一)
Basic teaching of crawler code
Application scenarios of Catalan number
Interface test weather API
golang操作redis:写入、读取hash类型数据
Summary of the design and implementation of the weapon system similar to the paladin of vitality
[open source project recommendation colugomum] this group of undergraduates open source retail industry solutions based on the domestic deep learning framework paddlepadddle
Code management tools
2022年华东师范大学计科考研复试机试题-详细题解
Error c2017: illegal escape sequence
Chapter 8. MapReduce production experience
dataworks自定义函数开发环境搭建
Create your own deep learning environment with CONDA
Yolov3 learning notes
这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意
Getting started with pytest
The difference between CONDA and pip
C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization: