1

I have recorded the script in JMeter, and while validating it, it is throwing an error for the winauth/sso, how to resolve it. my app has oAuth and me have to authenticate it.

I'm running the script for WinAuth, it gets highlighted in red color and under Response Body, it is displaying "Unauthorized" I have added the HTTP Cookie Manager (check CookieManager.save.cookies=true in jmeter.properties), HTTP Authorization Manager.[images are added down the below for verification purpose]

  • I'm not able to view the Token_id also.

Images:

1. showing winAuth sso error

showing winAuth sso error

2. showing all parameters with its respective values.

 showing all parameters with its respective values.

surender pal
  • 447
  • 6
  • 15
  • What error it throws? – Vadim Yangunaev Jan 16 '19 at 06:52
  • When I'm running the script for WinAuth, it gets highlighted in red color and under Response Body it is displaying "Unauthorized" – surender pal Jan 16 '19 at 07:03
  • Are you parse auth token at Login Page and send it to the request marked as Unauthorized? Or you Login action is Unauthorized? Need more information about your reqests. – Vadim Yangunaev Jan 16 '19 at 07:12
  • I'm new to JMeter and hence don't have any idea how to use it for load testing, I have recorded the script and validating it by running it, and now it is highlighting winauth sso script and even i have added HTTP AUTHENTICATION MANAGER and added baseurl username and password in it. – surender pal Jan 16 '19 at 07:13
  • Add HTTP Cookie Manager also – Vadim Yangunaev Jan 16 '19 at 07:25
  • Add a sceenshot of your WinAuth request settings. – Vadim Yangunaev Jan 16 '19 at 07:34
  • @surenderpal it seems you tried (and failed) to edit Vadim's answer to include a screenshot; you should [edit](https://stackoverflow.com/posts/54211607/edit) *your question* instead, and include the screenshot there. – lfurini Jan 16 '19 at 17:46

1 Answers1

0

You have to do at least three steps:

  1. Add HTTP Cookie Manager (and check CookieManager.save.cookies=true in jmeter.properties)
  2. Add HTTP Authorization Manager
  3. Using the Regular Expression Extractor extract Authentification token from the first request (from login page) and send it to the second requests.

See that article to get ideas about how to use the Regular Expression Extractor to extract authentication token https://dzone.com/articles/how-to-load-test-saml-sso-secured-websites-with-jm

Vadim Yangunaev
  • 1,817
  • 1
  • 18
  • 41
  • I have added the images inside Question, could you go through it and check what is the problem with it and I'm not able to view the token_id as well – surender pal Jan 17 '19 at 07:29