当前位置:网站首页>Performance test - LoadRunner obtains the return value and user-defined parameters (parameter operation)
Performance test - LoadRunner obtains the return value and user-defined parameters (parameter operation)
2022-06-23 22:32:00 【FutureTester】
example :
Mobile terminal operation ,A Added an event ( Return results : event id, for example :1),A At this time, you need to get the newly generated events id, And pass it as a parameter , To report this incident to B( Return results : event id unchanged , step id It's an event id Add 1),B You need to get the events returned from the report id And steps id To handle this matter .
One method :
If two return id All in loadrunner The return result shows (view-Test Results perhaps Tree You can view ):
You can use web_reg_save_param The function passes through the left and right boundary values , Locate what you need id, And then assign it directly to a variable , Then the next step is to call this variable directly
for example :
web_reg_save_param("sid",
"LB=aaa\":",
"RB=bbb",
LAST); The above example means that the left boundary aaa”: And the right border bbb The middle value is assigned to the variable sid. Be careful : Escape when there are double quotation marks on the left and right boundaries , Escape character :\
Loadrunner Cannot call directly in sid, With braces , for example :{sid}
Two methods :
If two return id Step 2 id be not in loadrunner The return result shows :
At this time, we can use the mobile packet capturing tool to assist us in testing , Find two id The relationship between .
As the title says : step id= event id+1
At this time, we can find out the event through a method id The assignment is sid, And then through lr_output_message Function print out :
for example :
lr_output_message ( "id: %s", lr_eval_string ( "{sid}" ) ); And then through atoi Function to sid Add 1
for example :
atoi(lr_eval_string("{sid}"))+1; Finally, directly atoi(lr_eval_string("{sid}"))+1 Just assign the value of to a variable
Be careful when defining variables :
All declarations should be placed in front of the script
Knowledge point :
1、atoi function : String reshaping
2、 Encountered double quotation marks to escape when getting the return value
3、web_reg_save_param The return values obtained by the function are all strings , If you want to perform an arithmetic operation , You need to type the obtained value now
边栏推荐
- Object declaration
- WordPress preview email for wocomerce 1.6.8 cross site scripting
- What is the difference between RosettaNet, EDI ANSI X12 and EDIFACT
- Go build command (go language compilation command) complete introduction
- You must like these free subtitle online tools: Video subtitle extraction, subtitle online translation, double subtitle merging
- What happened when the fortress remote login server was blocked? What can be done to solve it?
- In depth understanding of Internet of things device access layer
- API gateway monitoring function the importance of API gateway
- 脚本之美│VBS 入门交互实战
- Activiti practice
猜你喜欢

Opengauss Developer Day 2022 was officially launched to build an open source database root community with developers

openGauss Developer Day 2022正式开启,与开发者共建开源数据库根社区

Why is only one value displayed on your data graph?

Pourquoi une seule valeur apparaît - elle sur votre carte de données?

游戏安全丨喊话CALL分析-写代码

Application practice | Apache Doris integrates iceberg + Flink CDC to build a real-time federated query and analysis architecture integrating lake and warehouse

In the eyes of the universe, how to correctly care about counting East and West?

Game security - call analysis - write code

脚本之美│VBS 入门交互实战

为什么你的数据图谱分析图上只显示一个值?
随机推荐
Command line setting the next boot to enter safe mode
2021-12-18: find all letter ectopic words in the string. Given two characters
What should be done when the encryptor fails to authenticate in the new version of easycvr?
How to configure Nessus vulnerability scanning policy?
[tcapulusdb knowledge base] example of deleting data (TDR table)
there can be only one auto column and it must be defined as a key
0day1- (cve-2021-44228) log4j2 rce recurrence
Implement sequence restriction on memory operations
[tcapulusdb knowledge base] [generic table] read data interface description
Using nodejs and Tencent cloud API to identify invoices
How does the fortress machine view the account assigned by the server? What are the specific steps?
SAP mm ml81n creates a service receipt for a purchase order and reports an error - no matching Po items selected-
The article "essence" introduces you to VMware vSphere network, vswitch and port group!
Take you to understand the lazy loading of pictures
Devops sharing: how to hold the meeting?
New high-speed random graph API interface, the first sci-fi graph API interface
You must like these free subtitle online tools: Video subtitle extraction, subtitle online translation, double subtitle merging
脚本之美│VBS 入门交互实战
How to use xshell to log in to the server through the fortress machine? How does the fortress machine configure the tunnel?
Digital transformation solution for raw material industry chain supply chain platform