Badboy Script Gets Logout in JMeter

Badboy script gets logout in Jmeter just after doing a login transaction?

Did you ever face this issues while running the script in JMeter which was recorded using Badboy tool? If yes, the solution is really simple.
Just open the “HHTP Request” sampler and check the “Follow Redirect” checkbox.

When I first encountered this problem I thought this is some kind of weird issue with JMeter, but made sense when I got to know the reason behind it.

Reason:
Badboy is a great tool when it comes to recording a flow. But the script that it creates is not exactly same as JMeter creates.

I had used Badboy tool to record the scenario/workflow because of some ajax requests were not getting captured by the JMeter while recording. After recording the workflow in the Badboy tool, I had exported the script as a JMeter file using the Badboy tool itself.

The issue occurred when the script executed in JMeter tool and the issue was when I execute the script it gets logout or redirects to the logout page, each time. To me, that was a weird situation as all the dynamic values were properly correlated.

While doing Google, I came across to this Forum that finally give the answer that solves this.

When you record the script in Badboy and exported to JMeter, by default, the sampler has “redirect automatically” checked by switching that to “follow redirects” the problem will get resolved.

If “Redirect automatically” checkbox is checked then, it sets the underlying HTTP protocol handler to automatically follow redirects.

 

JMeter - Follow Redirect

%d bloggers like this: