当前位置:网站首页>[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})}
边栏推荐
- Operation before or after Teamcenter message registration
- 使用QT遍历Json文档及搜索子对象
- Career advancement Guide: recommended books for people in big factories
- Tita performance treasure: how to prepare for the mid year examination?
- Cartoon: how to multiply large integers? (I) revised version
- “12306” 的架构到底有多牛逼?
- Tkinter window preload
- Cartoon: looking for the k-th element of an unordered array (Revised)
- Ten top automation and orchestration tools
- 使用QT设计师界面类创建2个界面,通过按键从界面1切换到界面2
猜你喜欢
使用QT遍历Json文档及搜索子对象
ICML 2022 | Meta提出魯棒的多目標貝葉斯優化方法,有效應對輸入噪聲
Seven Devops practices to improve application performance
十个顶级自动化和编排工具
Why is all (()) true and any (()) false?
ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
GFS distributed file system
CVPR 2022最佳学生论文:单张图像估计物体在3D空间中的位姿估计
What are the changes in the 2022 PMP Exam?
VBA drives SAP GUI to realize office automation (II): judge whether elements exist
随机推荐
To solve the problem of "double click PDF file, pop up", please install Evernote program
2022年信息系统管理工程师考试大纲
Knowing that his daughter was molested, the 35 year old man beat the other party to minor injury level 2, and the court decided not to sue
LeetCode 练习——206. 反转链表
leetcode每日一练:旋转数组
Clickhouse (03) how to install and deploy Clickhouse
Why is all (()) true and any (()) false?
北京内推 | 微软亚洲研究院机器学习组招聘NLP/语音合成等方向全职研究员
求解为啥all(())是True, 而any(())是FALSE?
请问下为啥有的表写sql能查到数据,但在数据地图里查不到啊,查表结构也搜不到
Beijing internal promotion | the machine learning group of Microsoft Research Asia recruits full-time researchers in nlp/ speech synthesis and other directions
Daily exercise: a series of dates
Sentinel-流量防卫兵
得知女儿被猥亵,35岁男子将对方打至轻伤二级,法院作出不起诉决定
每日一练:关于日期的一系列
ICML 2022 | meta proposes a robust multi-objective Bayesian optimization method to effectively deal with input noise
Cmake tutorial step5 (add system self-test)
钉钉开放平台小程序API的缓存接口都有哪些内容?
Disorganized series
Cartoon: looking for the k-th element of an unordered array (Revised)