- I've added a regular expression extractor as a child element of the
HTTP request
- From the regular expression extractor I've created a new variable called
variabletest
.
Name of created variable: | variabletest |
---|---|
Regular Expression: | "id":"(.+?)" |
Template | $1$ |
Match No: | 1 |
I add Debug sampler to ensure it return the correct output.
- Request 1
- Regular
Expression Extractor
(Name of created variable:variabletest
) - Debug sampler
- Regular
- Request 2
- HTTP Cookie Manager
- Request 1
Then, I added a
HTTP Cookie Manager
at the bottom of the test plan. Where it configured as below.
Name: | Value | Domain | Path: | Secure |
---|---|---|---|---|
afiliation | ${variabletest} | localhost:8080 | /sample |
For the Request Body of request 1,2,3...
instead of showing the correct extracted variable value, it just show afiliation=${variabletest}
When I run the test, the ${variabletest}
is show as empty value, it seems like it doesn't consider the extracted variables.
Then, when I increase the loop count to 2
, I noticed, that the extracted variable only available for use in the second iteration of the test plan and not in the first iteration.
Any ideas?