当前位置:网站首页>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
边栏推荐
- Software testing learning - day one
- scroll-view指定滚动元素的起始位置
- 每日刷题记录 (十一)
- 10万奖金被瓜分,快来认识这位上榜者里的“乘风破浪的姐姐”
- The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?
- 2022年华东师范大学计科考研复试机试题-详细题解
- Summary of remote connection of MySQL
- MySQL installation
- vmware虚拟机C盘扩容
- Reading notes of "learn to ask questions"
猜你喜欢

golang操作redis:写入、读取kv数据

2022年华东师范大学计科考研复试机试题-详细题解

The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?

Daily question brushing record (11)

Ruoyi interface permission verification

每日刷题记录 (十一)

Yolov1 learning notes

多个全局异常处理类,怎么规定执行顺序

【开源项目推荐-ColugoMum】这群本科生基于国产深度学习框架PaddlePadddle开源了零售行业解决方案

IC_ EDA_ All virtual machine (rich Edition): questasim, vivado, VCs, Verdi, DC, Pt, spyglass, icc2, synthesize, innovative, ic617, mmsim, process library
随机推荐
The pressure of large institutions in the bear market has doubled. Will the giant whales such as gray scale, tether and micro strategy become 'giant thunder'?
Reading notes of "learn to ask questions"
[classes and objects] explain classes and objects in simple terms
[Code] occasionally take values, judge blanks, look up tables, verify, etc
“我为开源打榜狂”第一周榜单公布,160位开发者上榜
In depth analysis of reentrantlock fair lock and unfair lock source code implementation
golang操作redis:写入、读取hash类型数据
Abstract learning
opencv
centos php7.2.24升级到php7.3
[5g NR] UE registration process
Hands on redis master-slave replication, sentinel master-slave switching, cluster sharding
[LeetCode]404. Sum of left leaves
mysql误删root账户导致无法登录
php安装composer
vmware虚拟机C盘扩容
How to plan well?
VMware virtual machine C disk expansion
Floating menu operation
论文笔记 VSALM 文献综述《A Comprehensive Survey of Visual SLAM Algorithms》