How to Create a Basic Test Plan?
Steps to be followed while recording a script:
- Open a new Test Plan
- Right click on Test Plan->Add->Threads (users) ->Thread Group
- Right-click on Thread Group->Add->Config Element-> HTTP Cookie Manager
- Right-click on Thread Group->Add->Config Element-> HTTP Header Manager
- Right-click on Thread Group->Add->Config Element->HTTP Request Defaults
- Right-click on Thread Group->Add->Logic Controller->Recording Controller
- Right-click on Workbench->Add->Non-Test Elements-> HTTP Proxy Server*
- Click on HTTP Proxy Server, and from the Target Controller Drop down select ‘Thread Group>Recording Controller’ **
- Click on Start to record the script
- Once the recording is over, click Stop and save as a “.jmx” file
*Before recording go to Internet Explorer->Tools->Internet options->Connection->LAN settings. Check the Proxy server, address: localhost; port: 8080, and click ok.
**To exclude images, Add rows in the ‘URL Patterns to Exclude’ and use the code ”.*\jpg” , “.*\gif” , “.*\png”
To set the number of users:
- Click on Thread Group
- Set the Number of Threads (users)
- Set Ramp-up period (Time is in seconds). It sets the number of users that are initiated every second.
To add appropriate test results (Listeners) to the Test Plan
- Right-click on Thread Group->Add->Listener->View Results Tree. This report will give details of – Sampler (HTML page), Request info, and Response info.