Search code examples
jmetersingle-sign-onload-testingstress-testingokta

Using Jmeter with Okta SSO


I'm trying to do performance testing on a web app which has Okta SSO enabled, so basically I get login screen wherein I add username and password, then it redirects me to a page where I have to write security pin, the caveat is that the pin is of 6 digits, and Okta randomly asks to write any 2 digits from my pin, unless I do that I can't login to the web app. Good news is, in my recorded scripts I see pinDigits which are actually the digits that Okta asked for so there has to be a way to capture that pinDigits value, please refer screenshot below -

enter image description here

Now I want to capture that pinDigits value and store my full 6 digit pin in an array, then once I have the value, I can pass the digit on the basis of index of the array to pin parameter from screenshot above.

Answers are highly appreciated

Thanks


Solution

    1. For getting assistance on "capturing pingDigits value" you need to provide full (or at least partial) response from Okta and your Post-Processor configuration which does not work. It is not code-writing-for-free service and I have strong doubts regarding each community member having an application with Okta authentication installed somewhere. A swiss army knife solution for extracting "interesting" part of the response would be Regular Expression Extractor

    2. With regards to storing pinDigits into an array just create 6 separate JMeter Variables like:

      pinDigit_1=9
      pinDigit_2=8
      pinDigit_3=7
      pinDigit_4=6
      pinDigit_5=5
      pinDigit_6=4
      

      So you will be able to refer 1st digit using ${__V(pinDigit_1)}, 2nd digit using ${__V(pinDigit_2)}, etc.

      If you will have another JMeter Variable holding Okta response, i.e. oktaDigit the syntax to get the combined variable would be like ${__V(pinDigit_${oktaDigit})}.

    References: