Author - StudySection Post Views - 8,557 views
jmeter_login

Testing the login page using Jmeter

Jmeter

Jmeter is a Java-based open-source testing tool. It is designed for the load and performance testing of the application. Jmeter is used to analyze, measure, and check the behavior of the application against heavy load, multiple and concurrent user traffic.

Steps to perform the login page testing with the assertion:

1. First, we need to add Thread Group to Test Plan:
Right-click on Test Plan> Add > Threads
Jmeter 1

Number of Threads: Total number of virtual users.
Ramp-Up Period: Time taken to reach the full number of threads.
Loop Count: Loop Count is the number of executions for the script.

2. Add the HTTP Request Default: Here, we need to enter the URL of the testing site.
Right-click on Thread Group> Add > Config Element > HTTP Request Defaults
Jmeter 2

Enter the URL/IP address of the site to perform the performance testing Such as www.studysection.com
3. Add the HTTP Cookie Manager: Cookie policy should be set to Compatibility.
Right-click on Thread Group > Add > Config Element > HTTP Cookie Manager

4. Add the Simple Controller: A simple controller is used as a container for the request. We add the login and home page under the simple Controller.
Right-click on Thread Group > Add > Logic Controller > Simple Controller

5. Add the HTTP Request: It is used for HTTP page requests. Here we will enter the path of the site page.
Right-click on Simple Controller> Add >Sampler> HTTP Request
Jmeter 3

As you can check in the above screenshot, we added the path of the login page and added two parameters(username and password) with value on the HTTP request page.

# Now, we are adding one more HTTP request page to verify the homepage of the site.
Jmeter4
The method should be set to Post to test the login and home page.

6. Now add the Assertion method to verify the Home page after login into the application.
Right-click on Homepage(HTTP request) > Add > Assertions > Response Assertion
Jmeter5

Add text to verify the homepage. Here we are adding the title (My Learning) to verify the home page. For that, we need to click on the add button display on the above screenshot. We can assert the home page with other content (title, headings, etc) available on the Home page.

7. The last step to view the result, add Listener: To view the result we can add any listener in the test plan
Right-click on Thread Group > Add > Listener > View Result Tree
Jmeter6

As we can check response data in the listener, we get the title of the home page and our test case pass. If My Learning is not displaying in the response then that means the assertion text does not match with response data and our home page test case fails.

People having good command over the French language can get a French certification from StudySection. StudySection offers both beginner level and expert level French certification exams to test the ability to communicate in the French language.

Leave a Reply

Your email address will not be published. Required fields are marked *

fiteesports.com rivierarw.com cratosroyalbet betwoon grandpashabet grandpashabet giriş deneme bonusu veren siteler casino siteleri