当前位置:网站首页>[JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business
[JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business
2022-07-05 17:52:00 【bulabula2022】
background :
The author is making an interface / During the performance test , Encounter scenarios that require a lot of test data , Or return the whole service link through interface test , Through a little accumulation , Realized jmeter There is no dead data written in the script , The whole process is variable , Parameters , Function implementation wants test data , Write it once , Goals that can be used in any test environment configuration basic environment . Now let's share , Welcome to communicate
1、 Overall overview

2、 beanshell Get local files automatically , Automatically add users , And initialization

User added script

3、 Initialize user data , Initialize business data , Sign in token obtain , And save

token,user ,account Etc. write locally 
4、 Create basic business data ,java Automatic access to N Days ago, N Days later, a specific timestamp
Script body The body should be all parameters , Variable function, etc , It can be applied to any test environment
json Extractor ,beanshell Written in java Program
5、 json Format data JSONObject and JSONArray Handle ,java Get the returned dynamic data , Cycle parameters to the next business

The number of cycles is dynamically obtained

Other functions are also used in the script , as follows
Date function :
${__longSum(${__time},+86400000,)},
${__longSum(${__time},-86400000,)}
Circulation controller :
${Name_#}
Counter :
starting value:1,
Increasing :1,
max value:${Name_#},
Reference name :N,
A parameterized :${__V(Name_${N})}
边栏推荐
- Oracle recovery tools -- Oracle database recovery tool
- 漏洞复现----48、Airflow dag中的命令注入(CVE-2020-11978)
- 2022新版PMP考试有哪些变化?
- EPM related
- SQL Server(2)
- Thesis reading_ Medical NLP model_ EMBERT
- Clickhouse (03) how to install and deploy Clickhouse
- 统计php程序运行时间及设置PHP最长运行时间
- Cmake tutorial step5 (add system self-test)
- mybash
猜你喜欢

7 pratiques devops pour améliorer la performance des applications

Cmake tutorial Step2 (add Library)

Short the command line via jar manifest or via a classpath file and rerun

EPM相关

Seven Devops practices to improve application performance

GFS distributed file system

Mask wearing detection based on yolov3

Ten top automation and orchestration tools

c#图文混合,以二进制方式写入数据库

Zabbix
随机推荐
leetcode每日一题:字符串中的第一个唯一字符
Clickhouse (03) how to install and deploy Clickhouse
Cartoon: interesting pirate problem (full version)
Why is all (()) true and any (()) false?
Force deduction solution summary 729- my schedule I
Which is more cost-effective, haqu K1 or haqu H1? Who is more worth starting with?
rsync
外盘黄金哪个平台正规安全,怎么辨别?
MATLAB查阅
Tita performance treasure: how to prepare for the mid year examination?
Cartoon: a bloody case caused by a math problem
云主机oracle异常恢复----惜分飞
Elk log analysis system
北京内推 | 微软亚洲研究院机器学习组招聘NLP/语音合成等方向全职研究员
使用QT设计师界面类创建2个界面,通过按键从界面1切换到界面2
tkinter窗口预加载
Ordinary programmers look at the code, and top programmers look at the trend
Cartoon: how to multiply large integers? (I) revised version
Mongodb (quick start) (I)
神经网络自我认知模型