In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
The so-called relevance, the number is to grab part of the information through the corresponding information, such as hidden or session and so on.
To use associations in jmeter, there are two steps:
Step 1. Add a regular expression under the Sampler request to get the information, Add > Post Processors > Regular Expression Extractor
1.1 most of us need to intercept part of the information. We can look at the source code, find the code we need, and then use regular processing. Here is an example:
The function is to extract values from userSession
1.2 sometimes, when we need to extract all the response information, we can use the following rules:
Step2. Add PostProcessers, select BeanShell PostProcessor, and then go further.
In BeanShell, we can use java code to deal with the regular extraction. The general step is to receive the value extracted by the regular expression. If this value needs to be used as a parameter for later Sampler, we have to save it as a variable to facilitate later call.
Continue to illustrate with userSession in the first example:
Since the post needs to submit the session in the login url, I saved it as the variable Session. Here is the session value of the call to the login url.
If we need to print the regular crawl to the local document, we can add the following code to BeanShell PostProcesser:
Import java.io.*
String value = bsh.args [0]
Print (value)
File f = new File ("D:" + File.separator+ "log.txt")
FileWriter w = new FileWriter (fjre true)
W.write (value+ "\ n")
W.close ()
Value receives parameter values, print prints the parameters to the command line, and I use D:\ log.txt for the local file, which can be set by myself. Save to a file, which can be used to analyze statistics.
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.