当前位置:网站首页>[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})}
边栏推荐
- Disorganized series
- Size_ T is unsigned
- 企业数字化发展中的六个安全陋习,每一个都很危险!
- Cartoon: interesting pirate problem (full version)
- The comprehensive competitiveness of Huawei cloud native containers ranks first in China!
- Leetcode daily question: merge two ordered arrays
- GFS distributed file system
- 论文阅读_中文NLP_LTP
- Tita performance treasure: how to prepare for the mid year examination?
- Seven Devops practices to improve application performance
猜你喜欢
Vulnerability recurrence - 48. Command injection in airflow DAG (cve-2020-11978)
Configure pytorch environment in Anaconda - win10 system (small white packet meeting)
Elk log analysis system
mybash
神经网络自我认知模型
PMP认证需具备哪些条件啊?费用多少啊?
论文阅读_医疗NLP模型_ EMBERT
Daily exercise: a series of dates
VBA drives SAP GUI to realize office automation (II): judge whether elements exist
Abnormal recovery of virtual machine Oracle -- Xi Fenfei
随机推荐
ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
Unicode processing in response of flash interface
Why is February 28 in the Gregorian calendar
GFS分布式文件系统
「运维有小邓」用于云应用程序的单点登录解决方案
基于YOLOv3的口罩佩戴检测
Knowledge points of MySQL (7)
ITK Example
Operation before or after Teamcenter message registration
QT控制台打印输出
Teamcenter 消息注册前操作或后操作
Please tell me why some tables can find data by writing SQL, but they can't be found in the data map, and the table structure can't be found
力扣解法汇总729-我的日程安排表 I
Ordinary programmers look at the code, and top programmers look at the trend
c#图文混合,以二进制方式写入数据库
论文阅读_医疗NLP模型_ EMBERT
Disabling and enabling inspections pycharm
Career advancement Guide: recommended books for people in big factories
Why is all (()) true and any (()) false?
Mongodb (quick start) (I)