1

I am using JMeter for QA automation tools. I've tried some ways to log in, read from blazemeter and jmeter manuals, read about oAuth. I also made JMeter use browser(firefox in my case) to log in (but I didn't understand that much) but still didn't pass it.

I also asked the IT person who is responsible for developing the site, but he never used JMeter before as well, so he didn't know how to solve it.

The most response I got from JMeter is "redirecting" which as far as I know I have issue with the oAuth.

I tried it on demo.a
Can anyone give solution?

  • What is demo.a? – user246 Aug 8 '16 at 12:15
  • Are you calling webdriver from JMeter? You used the webdriver tag but you didn't mention it in your question. – user246 Aug 8 '16 at 12:16
  • Sorry, sir. I mean demo.tada.id I tag webdriver because I used it too in JMeter, but I don't know how it works Can you teach me sir? – robby syaifullah Aug 9 '16 at 1:45
1

Usually the process looks as follows

  1. Record login scenario using your browser and JMeter's HTTP(S) Test Script Recorder
  2. Perform correlation - detect any dynamic values, extract them from 1st response, convert them into JMeter Variables and use them in 2nd request

Looking into http://demo.tada.id/ website it seems to be having authenticity_token dynamic parameter which is being used for CSRF protection in Ruby-on-Rails applications. So you need to send the correct value each time you login.

Your test plan should look as follows:

  • Open login page
  • Perform POST request providing
    • card number
    • pin
    • authenticity_token value from the previous response

If you have any problems with correlating this authenticity_token value - you can try an alternative solution for recording JMeter test scripts. It has SmartJMX mode with automatic correlations of any dynamic entities so you wouldn't have to worry about it at all. Check out How to Cut Your JMeter Scripting Time by 80% article for more details.

  • Thank You Mr. Dmitri, I have tried use SmartJMX, but that still gave the same result <html><body>You are being <a href="demo.tada.id/">redirected</a>.</body></…> -------------------------------------------------------------- The steps I did 1. I record it via android mobile 2. export it as SmartJMX 3. disable the "Referer None" Threads 4. Give Listener at "demo.tada.id" thread 5. ctrl + R ----------------------------------------------------- Did I do something wrong? – robby syaifullah Aug 9 '16 at 10:34
  • And the authentication_token is not changing, I think smartjmx didn't make the parameter for login script becomes dynamic, And can I get your e-mail or other accounts, sir? I really want to learn from you – robby syaifullah Aug 9 '16 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.