Elizabeth
Elizabeth

Reputation: 31

Multiple Users in JMeter Resulting in an Error

Currently all the JMeter scripts I have written never have any errors when I run them with one user. When I add more however (ie 5), then one or two will end up giving me the 401 Authorization Required message. I have two reg-ex extractors capturing the X-CSRF currently and I use those values in the HTTP Header Manager. I'm not getting why I only get an error part time (I know it's not because of my User Parameters because when I run the different users one user at a time they work). Is it something that doesn't work with the website I'm testing? Or JMeter? Or have I missed something?

Upvotes: 3

Views: 1237

Answers (2)

rachna bafna
rachna bafna

Reputation: 501

Can you please check following:

  1. Is your token being extracted properly? - You can add debug sampler at the end of the test. This will show you values picked by different users. Just run one iteration for easy debugging.

  2. Have you added cookie manager? Check if you are clearing cookies after every iteration?

  3. Have you added cache manager? Check if you are clearing cache.

  4. Do you have a global header manager or header for each request separately? If you are using default header manager, that could cause this issue.

Upvotes: 1

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

Most probably your extractors are failing to extract the tokens.

I suggest that you use gui to debug:

  • add a View Results Tree and run your test.

  • add a debug post processor under Test Plan

  • run your test

See what you extracted. Then use in View Results Tree response tab the Regexp Tester to see if your regexp match responses and extract tokens correctly.

Upvotes: 1

Related Questions