This page talks about how to create Test script for load testing, Endurance(soak) testing, spike testing and stress testing using JMeter tool.
Steps to create Script for web application -
1. Choose web test plan template from JMeter test plan section.
2. Use below configuration to simulate login, actions and logout transactions which is a typical use case of web test plan.
Follow the below steps sequentially.
- Add Simple controller under thread group, add login requests inside it.
- Add Runtime controller and actions which you want to run for specified time.
- Add simple controller, keep logout requests inside it.
3. Make sure to complete other performance test script best practices like correlation, parameterization, and naming convention.
3. Save the script and you are good to go. This script will do single login and runs the actions request for specified amount of time, after that logout step executed.
4. For Load testing, typical test duration will be 1 hour to 4 hours, you can go up to 4 hours also.
For Endurance Testing, typical test duration will be from 1-day to 2-days,you can go up to 1 week.
5. For Stress testing, change the thread group type to "jp@gc – Stepping Thread Group" (which can be downloaded from plugin manager). Configure a ramp up of user load to find the breakpoint of the application as per requirements in thread group. Add scripts by following step 2 and step 3.
6. For Spike testing, change the thread group type to "jp@gc – Ultimate Thread Group". Configure user load spike as per the requirements in thread group. Add scripts by following step 2 and step 3.
Note : Below component settings can be changed as per the business use case you need to simulate.
HTTP cookie manager – used it for cookie related configuration
HTTP header manager – used for request header related setting which is common for all requests.
HTTP cache manager – used for user cache related settings.
Comments
Post a Comment