I definitely feel like I am missing something obvious, but here it goes anyway. I have a script that does the following per user in a thread group:
login
get a json list for that user
extract a part of the list from the response with a regex extractor into a variable called feed
start a for loop with feed_matchNr number of iterations
start a Counter
get the nth item from the list and use JSON Post Processor on the feed variable to get an id
make an additional http request with that id
continue loop

This all works as expected ... until I disable the Debug Sampler. Then the http request no longer "expands" the variable, instead the request has something like /api/path/${myid}/foo and fails. What black magic is the Debug Sampler doing and how can I do the same magic without it?
Your issue is the following:
First understand that Post Processor only runs IF the is a Sampler in its scope:
So in you plan, when you put a Debug Sampler , it runs. If you disable it, it only runs for post comment, so it has not initialized the variable for post comment.
Also is there a reason to put -1 in JSON Post Processor, this means you want to get all values:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With