0
votes

How i can pass the value of below from one http request to another in Jmeter ?

code value generate random value at run time.I need to extract the value of code.

var launch_url = "/abc/FileUpload/FileUpload.application?code=" + code;

I explored RegularExpression / CSS Extractor but was not able to fit in my case.

I am extracting the value of Antiforgerytoken like below sample (Screenshot) and it works -

<input type="hidden" name="ctl00$AntiforgeryToken" id="AntiforgeryToken" value="40579e4b-7718-4bb2-abaa-4d98c391fb48" />

but i am not sure how to extract value of code from this ??

var launch_url = "/abc/FileUpload/FileUpload.application?code=" + code;

enter image description here

2
Please share the issue details. Why regEx is not working? Provide some snapshots if possible. This will help to response faster to your problem.sunny_teo

2 Answers

0
votes

Considering, You need to get the code value from the URL shown which comes in the response. Please check the below regEx:-

enter image description here

Hope it helps.

0
votes

You can use the regular expression extractor element of Jmeter and use the below regular expression to capture the token.

id="AntiforgeryToken" value="(.*?)" />