Creating login script via jmeter for a public website

1.9k views Asked by At

I am using Blazemeter load testing plugin for chrome and I recorded a login script of a website which is not owned by me. How ever when i try to assert via jmeter to verify whether I have successfully logged in via response assertion it fails.

Further when i look in to the result tree - html content it shows that the script has not loged in hence the assertion fails.

I tried several videos but still can not find out the issue. Any suggestions

2

There are 2 answers

0
Dmitri T On
  1. Try adding HTTP Cookie Manager to your test plan, if the problem is in missing cookies it'll automatically handle it. If there are any hard-coded cookies after recording in HTTP Header Manager aka "Browser-derived headers" - remove them.
  2. Try recording your login flow sequence for several times and see if there are any dynamic parameters (request values which change from one request to another). If they are - they need to be extracted from first response and added to next request.
  3. Check ASP.NET Login Testing with JMeter guide out. It contains correlation example specific for .NET web applications but general steps should be the same and could be applied to any server-side tecnhology.
8
Helping Hands On

Make sure that you using 2 login request. 1st for GET and 2nd for POST.

You need to pass username , password when you do POST.