1

I made a Jmeter script like one thread in it login then my transaction and logout. I have put login n only once controller and transaction in loop controller. But when I execute concurrent thread some threads are failing as csrf token is not matching sequentially. I extract csrf token using regular expression. For 1-2 users it is working fine but more threads it is failing.

1 Answer 1

1

Try adding some debug logging to your test, i.e.

  1. Save CSRF Token value into .jtl results file using Sample Variables property
  2. Save all the responses into the .jtl results file, you can do this by adding the next lines to user.properties file:

    jmeter.save.saveservice.output_format=xml
    jmeter.save.saveservice.response_data=true
    jmeter.save.saveservice.response_data.on_error=true
    
  3. Inspect the response and the CSRF Token variable value using Debug Sampler and View Results Tree listener combination - it should be 100% match for each virtual user and different threads (virtual users) must have different CSRF Token values.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.