1
votes

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?

1

1 Answers

5
votes

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