Reputation: 340
Are there any techniques that can be used to log in to a website with JMeter, when you are asked for the x,y,z characters of the password?
edit: a little more info: I'm recording HTTP requests, and for our local environment you just login with the password, which works fine. For the "live" site it asks for random different characters.
Upvotes: 1
Views: 202
Reputation: 34566
In order to implement what you want you have to proceed this way:
Extract from the page that ask the 3 characters using either Regular_Expression_Extractor , CSS/JQuery Extractor or JSON Extractor. This will create for example 2 variables start and end
Then add a JSR223 Post Processor using Groovy to extract the characters required from the password, example:
def start = vars["start"]; def end = vars["end"]; def password = vars["password"]; // This can come from a CSV or be hard coded if it does not change vars.put("passwordExtract", password.substring(start, end));
Upvotes: 1