当前位置:网站首页>loadrunner script -- parameterization
loadrunner script -- parameterization
2022-08-09 20:29:00 【wangmin】
Tip:
Parameterization
Why are scripts parameterized?One reason is that some values in the script are unique and cannot be repeated. If the same value is used for playback, the playback will fail. For example, if we add an account, the account name must not be repeated; the other reason is toSimulate a real operation scenario. After all, it is impossible for the same user to log in in the production environment, and it is impossible to enter the same parameters during operation.The purpose of parameterization is to simulate the real operation scene as much as possible.
a
Right click Replace with Parameter-Create New Parameter
Two
After clicking, the following input box will pop up
Three
After clicking "OK" above, the following prompt box will pop up.
means if you want to replace that parameter with the same value elsewhere in the script.
Five
After replacement, it will display as follows
Six
After the replacement is completed, select the parameter name, right-click and select Parameter Properties to design the parameter value we want to replace, as shown below
Click Add Row to add a row;
Or click Browse to select a document we have edited and import it directly;
Or click Edit with Notepad to enter the parameter value in the text editor
(1) Sequential: Press from the first lineTake values one by one in order
(2) Random: Each iteration randomly selects a value from all values
(3) Unique: Unique value, the value in the list can only be taken once
Seven
Add a new parameter. When selecting the strategy of the next line, a new option will appear, Same line as productId,
This means that when the script is executed, which line of data is selected by productId, the color will beWhich row of data to select.
Eight
Update value on: update the parameter data under what circumstances
(1) Each iteration: take a value for each iteration.
(2)Each occurrence : Update the value every time the parameter name is encountered.If the parameter name appears twice in an iteration, the two values are different.
(3) Once: The value is only taken at the first iteration, and the first value is used for subsequent iterations.
These two value strategies, different combinations will also produce different value methods, let's combine the above examples to describe in detail what the combination of these strategies will produce.
Sequential+Each iteration: Take the value once in each iteration, take the value in order from the first row, and retake the value from the first row when all the values are taken.We start to take the value from 2019blue-Tshirt01 in the first row. When the value reaches 2019blue-Tshirt04, the next time the value is taken, it will start to cycle from 2019blue-Tshirt01.If the parameter {productId} appears twice in the script, it will take the same value twice.
Sequential+Each occurrence: Values are taken every time a parameter is encountered, starting from the first row in order, and when all values are taken, re-take values from the first row.For example, if {productId} appears twice in the script, the first time it appears, the value is 2019blue-Tshirt01, the second time it appears, the value 2019blue-Tshirt02, and so on.
Sequential+Once: Each iteration takes the first fetched data.The first time I get it is 2019blue-Tshirt01, and all the places where parameters are used and all subsequent iterations are obtained as 2019blue-Tshirt01.
Random+Each iteration: Randomly take a row of values from the list each iteration.In one iteration, a random value of 2019blue-Tshirt01 is taken where the parameter name appears for the first time. If the parameter name is encountered again in this iteration, it will be taken as 2019blue-Tshirt01, and the value will be randomly selected again in the next iteration.
Random+Each occurrence: The value is randomly selected each time a parameter is encountered. In an iteration, a random value 2019blue-Tshirt02 is taken at the place where the parameter name appears for the first time. Then the parameter name is encountered again in the iteration.Just get the value again, it may be 2019blue-Tshirt04.
Random+Once: The first iteration randomly selects a row of values, such as 2019blue-Tshirt03 for the first time, the parameter names encountered in this iteration and each subsequent iteration use the value of the first iteration2019blue-Tshirt03.
Unique+Each iteration: Take a row of values at each iteration, starting from the first row in order.
Unique+Each occurrence: Values are taken every time a parameter is encountered, starting from the first row in order.
Unique+Once: The first iteration takes a row of values, and each subsequent iteration takes the value of the first iteration.
Nine
https://baijiahao.baidu.com/s?id=1699634722539482943&wfr=spider&for=pc
a>边栏推荐
- API接口是什么?API接口常见的安全问题与安全措施有哪些?
- 一文深入了解 Hybrid 的实现原理
- mysql双主备份失败?
- Discuz!论坛程序安装+模板配置教程
- shared usage in d
- openEuler Xiong Wei: How do you view the SIG organization model in the open source community?
- 动手学深度学习_全卷积网络 FCN
- 基于AWS构建云上数仓第一步:云平台的基础概念
- Li Yuanyuan: iMetaLab Suite metaproteomics data analysis and visualization (video + PPT)
- 动态RDLC报表(五)
猜你喜欢
What are some good open source automation testing frameworks to recommend?
有什么好的开源自动化测试框架可以推荐?
leetcode300.最长递增子序列(动态规划)
The principle implementation of handwritten flexible.js, I finally understand the multi-terminal adaptation of the mobile terminal
100+开箱即用的AI工具箱;程序员150岁长寿指南;『地理空间数据科学』课程资料;Graphic数据可视化图表库;前沿论文 | ShowMeAI资讯日报
自学软件测试,学到什么程度可以出去找工作啊?
从事软件测试一年,只会基础的功能测试,怎么进一步学习?
The difference between approach and method
The most complete architect knowledge map in history
动手学深度学习_全卷积网络 FCN
随机推荐
Discuz!论坛程序安装+模板配置教程
动态RDLC报表(一)
shared usage in d
【工业数字化大讲堂 第二十一期】企业数字化能碳AI管控平台,特邀技术中心总经理 王勇老师分享,8月11日(周四)下午4点
毕昇编译器优化:Lazy Code Motion
低代码平台和专业开发人员——完美搭档?
The difference between approach and method
论文解读:Deep-4MCW2V:基于序列的预测指标,以鉴定大肠杆菌中的N4-甲基环胞嘧啶位点
李乐园:iMetaLab Suite宏蛋白质组学数据分析与可视化(视频+PPT)
偷偷盘点一下各大互联网公司的实习薪资
LeetCode做题小结
mysql generates random name, mobile number, date
win10 uwp 无法附加到CoreCLR
How to choose a good SaaS knowledge base tool?
What platform is EPIC?
openEuler Xiong Wei: How do you view the SIG organization model in the open source community?
手写flexible.js的原理实现,我终于明白移动端多端适配
方舟开服务器Vmware虚拟机安装不上?
How tall is the B+ tree of the MySQL index?
艺术与科技的狂欢,云端XR支撑阿那亚2022砂之盒沉浸艺术季