In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-10-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Video course "Software performance testing and LoadRunner Application"
Http://edu.51cto.com/course/course_id-1377.html
More introduction to the curriculum system
Http://www.1testing.cn
Recently, when I was doing the Loadrunner course, I came across the lr_save_string function again. Some people are asking about the use of this function, and post a demo again for your reference.
The lr_save_string function is mainly to save constants or variables in the program as parameters in lr.
Int lr_save_string (const char * param_value, const char * param_name)
Function purpose: save the param_value value to the param_name variable
Parameter description: param_value: value to be saved
Param_name: variable name
Example:
Char * software= "hello"
Lr_save_string ("10", "test"); / / Save the constant 10 as the parameter test
Lr_output_message (lr_eval_string ("{test}")); / / gets and outputs the current value of the parameter page
Lr_save_string (software, "test"); / / Save the variable as a parameter and software as a variable
Lr_output_message (lr_eval_string ("{test}"))
Execution result:
ten
Hello
two。 Look at another example. In the learning performance test, some friends often use a virtual machine. After recording the script with loadrunner, the next step is to get the server's IP through lr_save_string.
Action ()
{
Lr_save_string ("192.168.42.47", "SeverIP"); / 192.168.42.47 is the ip of the virtual machine. If the virtual machine ip changes frequently, you can modify it here and pass it to the parameter SeverIP.
Web_url ("forum.php"
"URL= http://{SeverIP}/Discuz/upload/forum.php",
"TargetFrame="
"Resource=0"
"RecContentType=text/html"
"Referer="
"Snapshot=t1.inf"
"Mode=HTML"
LAST)
Return 0
}
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.