2

I wanted to login my page using JMeter, i have used login config element with appropriate username and password, but it doesn't work. So please help me and guide me to solve this problem.

4 Answers 4

9

Try recording your test script using the blazemeter's chrome extension. Once you have recorded the script download the jmx file and load it in jmeter and run your test.

UPDATE (from comments): The script is not chrome-specific. It records the script in jmx which is the file format in which the jmeter test plans are saved, so once recorded you can edit it and use it with jmeter.

Blazemeter is not free but you can sign up for a free user account. The chrome extension used to record script is free and by logging in with your free account you can download the recorded script.

Check his tutorial for an easy tutorial - https://www.patelmilin.com/blog/testing/tools/performance-testing-with-jmeter.html

6
  • Is the script that's generated Chrome specific?
    – corsiKa
    Aug 24, 2014 at 18:50
  • 2
    No its not! Its records the script in jmx which is the file format in which the jmeter test plans are saved! So once recorded you can edit it and use it with jmeter! :) Aug 25, 2014 at 5:36
  • but blazemeter is paid version or open source? Aug 25, 2014 at 7:29
  • 2
    You can sign up for a free user account. The chrome extension used to record script is free and by logging in with your free account you can download the recorded script. Aug 25, 2014 at 7:31
  • 1
    @milinpatel17, I've added your comments to your answer because they provide useful information to anyone who has this problem.
    – Kate Paulk
    Aug 25, 2014 at 11:09
4

We do not have enough information to help you with your situation directly, but I have an idea how you can fix this yourself.

You can create a recording with JMeter by using the test script recorder.

  • Setup a test plan
  • Start recorder
  • Configure browser to use JMeter proxy
  • Preform actions you want to record in the browser
  • Run recorded test plan

Now you can record the login steps by using a real browser, JMeter should include everything you need to login and continue. Including cookies, etc...

See this PDF for a step by step usage: http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf

0
2

First of all, add HTTP Cookie Manager to your plan. It'll automatically handle sessions and cookie-based authentication.

After that you can see if there any mandatory dynamic parameters are passed with the request. Just record your log in test case several times and see what parameters are static and what are changing from time to time. If there are any you'll need to fetch them from opening login page response and pass as arguments for the request which does actual log in.

See ASP.NET Login Testing with JMeter guide for more details, the approach will play even for not .NET based web applications.

0

I forgot to enter my parameter in JMeter, so it couldn't recognise them.

With Reference from this link

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