当前位置:网站首页>[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})}
边栏推荐
- CVPR 2022 best student paper: single image estimation object pose estimation in 3D space
- 排错-关于clion not found visual studio 的问题
- 得知女儿被猥亵,35岁男子将对方打至轻伤二级,法院作出不起诉决定
- Knowledge points of MySQL (7)
- 如何保存训练好的神经网络模型(pytorch版本)
- 证券网上开户安全吗?证券融资利率一般是多少?
- EPM相关
- Oracle Recovery Tools ----oracle数据库恢复利器
- 职场进阶指南:大厂人必看书籍推荐
- Seven Devops practices to improve application performance
猜你喜欢
随机推荐
哈趣K1和哈趣H1哪个性价比更高?谁更值得入手?
「运维有小邓」用于云应用程序的单点登录解决方案
十个顶级自动化和编排工具
mybash
This 17-year-old hacker genius cracked the first generation iPhone!
7 pratiques devops pour améliorer la performance des applications
Oracle recovery tools -- Oracle database recovery tool
Cmake tutorial step6 (add custom commands and generate files)
请问下为啥有的表写sql能查到数据,但在数据地图里查不到啊,查表结构也搜不到
外盘黄金哪个平台正规安全,怎么辨别?
Use QT designer interface class to create two interfaces, and switch from interface 1 to interface 2 by pressing the key
What are the requirements for PMP certification? How much is it?
ITK Example
VBA drives SAP GUI to realize office automation (II): judge whether elements exist
ICML 2022 | Meta提出魯棒的多目標貝葉斯優化方法,有效應對輸入噪聲
云主机oracle异常恢复----惜分飞
Why is February 28 in the Gregorian calendar
Disabling and enabling inspections pycharm
Elk log analysis system
rsync









