2. Performance testing
Done for quality assurance of software.
Make sure that the software is working well under their expected workload.
Tools:-
HP Loadrunner
Load UI
Test complete
WebLoad
Apache Jmeter
3. What is Jmeter ?
1. It is a performance testing tool written in Java.
2. Originally designed for testing Web Applications only but also used to test other
apps.
3. Can also perform Functional, Regression, and Unit testing.
4. How Jmeter works?
JMeter acts like a group of users sending requests to a target server.
It collects response from target server and other statistics
then describes the performance of the application via graphs or tables.
5. Why Jmeter
It is an Open source tool.
Supports different types of server:
HTTP, HTTPS (Web)
JDBC ( Database)
LDAP ( Directory Access protocol), FTP(File transfer protocol)
SMTP (Mail)
User friendly GUI Design compare to other tools.
Supports multithreading.
Supports Caching and Cookies.
Controllers are configurable and can monitor the server performance.
Test results can be captured in various format like summary report, Graph, Aggregate report, Aggregate
graph, Results in tree and Results in Table.
6. Install Jmeter
Step1: Install JDK.
Step2: Download Jmeter http://jmeter.apache.org/download_jmeter.cgi
Step3: Unzip and keep Jmeter folder at any location.
7. Running JMeter In Windows
Go to [Jmeter installation path]bin
Run Jmeter.bat
8. Element to create test plan on Jmeter
1. Threads Group and Threads: Threads = Users
Setup number of User
Set up ramp up period
No. of times test executes
2. Controllers : Containers for grouping Samplers, other elements, add logic.
Sampler (Send Request to Server)
3. Listener : Reports results/monitors performance
Graph Result
View Results Tree and many more.
9. Continue…
4. Assertions: Validations on responses, step results
Allow you to assert fact about responses received from HTTP request
5. Preprocessor
Execute action before the sample request are execute.
6. Post Processor
Execute some action after sampler request are execute.
10. Create Test plan on Jmeter
Step1 ) Add thread Group: Right click on the Test Plan and add a new thread group.
Start Jmeter
Select Test Plan
Add Thread Group
Step2) Add sampler. i.e(Http request to the server)
Step3)Add Listener to view the response data from server.
Step4) Add Assertion if required.
16. Proxy server setup on Jmeter
1. Start JMeter.
2. Add a thread group, as follows:
3. Right-click on Test Plan and navigate to Add | Threads (User) | Thread Group.
4. Add the HTTP(S) Test Script Recorder element, as follows:
5. Right-click on WorkBench and navigate to Add | Non-Test Elements | HTTP(S) Test
Script Recorder.
6. Change the port to 7000 (1) (under Global Settings).
7. You can use a different port, if you choose to. What is important is to choose a port
that is not currently used by an existing process on the machine. The default is 8080.
17. Configure Firefox To Use JMeter Proxy
1. Open Firefox
2. Go to the Preferences menu
3. Click on the Advanced tab
4. Then Network tab
5. In the "Connection" section, click on "Settings..."
6. Select the "Manual proxy configuration" radio button
7. Set HTTP Proxy to "local host" and Port to “7000"
8. Check "Use this proxy server for all protocols"
8. Click OK and exit the Preferences menu