-1

I am facing issues like I have some requests inside if controller and from those requests, I am fetching some json data and I have to use that data in another if controller and outside from if controller, but I am not able to get that data. please help me out. My test plan structure is like this- enter image description here

1

There is no limitations in passing the variables between If Controllers, once the variable is set up it will be visible for this thread (virtual user) until its termination. As per JMeter Documentation Variables are local to a thread; so if you define the variable in 1st If Controller (assuming that the logic will be executed) the variable will be visible for all the Samplers which are "below"

Demo:

enter image description here

So my expectation is that your "fetching some json data" process fails somewhere somehow, double check your Post-Processor configuration and ensure that the variable is there and has its respective value using Debug Sampler and View Results Tree combination

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.