问题
My Jmeter response looks like..
https://adcd.com/abc/bcd/mock.jsp?profile=teslatest&JTnumber=132323235674897&SUTest=27&SUName=Alexa&TARGET=abcd.com">
How to extract JTnumber from this and store in a csv? How about if we have 20 different JTnumbers from 20 responses? How to save all in a csv??
Please help me in achieving this..!!
回答1:
Add the next line to user.properties file (lives in "bin" folder of your JMeter installation)
sample_variables=JTnumber
see Sample Variables chapter of the JMeter User Manual for more information.
- Restart JMeter to pick the property up
Add Regular Expression Extractor as a child of the request which returns the above response and configure it like:
Add Flexible File Writer to your Test Plan and configure it like:
- That's it, when you run the test you will see
values.csv
file in the "bin" folder of your JMeter installation containing all theseJTnumber
values, each on new line
来源:https://stackoverflow.com/questions/60635179/how-to-extract-and-store-a-value-from-jmeter-response-and-store-inn-csv