1

I have to test a web-app for login using Jmeter.

How is that done?

Should I give the path of the login page in the HTTP Request sampler and add the username and password to the login config element?

sachsure
  • 828
  • 1
  • 17
  • 30

1 Answers1

5

It needs to be realistic hence your test should be designed as follows:

  1. HTTP GET Request (simulate opening Login page with a browser)
  2. HTTP POST Request (login event itself) where you pass your credentials and dynamic parameters

I would also recommend adding HTTP Cookie Manager to represent browser cookies and deal with cookie-based authentication.

See How To Use JMeter For Login Authentication guide for step-by-step overview and demo

Dmitri T
  • 159,985
  • 5
  • 83
  • 133