Performance Testing Process

Below is a generic performance testing process

http://cdn.guru99.com/images/performance_testing_process.png

1. Identify your testing environment

i.Know your physical test environment, production environment and what testing tools are available.

ii. Understand details of the hardware, software and network configurations used during testing before you begin the testing process.

That will help testers create more efficient tests. It will also help identify possible challenges that testers may encounter during the performance testing procedures.

2. Identify the performance acceptance criteria –

i. This includes goals and constraints for throughput, response times and resource allocation.

ii. It is also necessary to identify project success criteria outside of these goals and constraints.

iii. Testers should be empowered to set performance criteria and goals because often the project specifications will not include a wide enough variety of performance benchmarks. Sometimes there may be none at all.

iv. Also whenever possible find a similar application, to compare is a good way to set performance goals.

3. Plan & design performance tests –

i. Determine how usage is likely to vary amongst end users and identify key scenarios to test for all possible use cases.

ii. It is necessary to simulate a variety of end users, plan performance test data and outline what metrics will be gathered.

4. Configuring the test environment -

Prepare the testing environment before execution. Also, arrange tools and other resources.

5. Implement test design -

Create the performance tests according to your test design.

6. Run the tests -

Execute and monitor the tests.

7. Analyze, tune and retest -

Consolidate, analyze and share test results. Then fine tune and test again to see if there is an improvement or decrease in performance. Since improvements generally grow smaller with each retest, stop when bottleneck caused by the CPU. Then you may have to consider option of increasing CPU power.

Installation of Jmeter :

What is Jmeter?

Jmeter is a Java application, so a JRE or SDK first needs to be installed with a JAVA_HOME environment variable.
Jmeter can be downloaded in the below link:

http://jmeter.apache.org/download_jmeter.cgi(http://jmeter.apache.org/download_jmeter.cgi)

• Download Jmeter, and install by unzipping the .zip or .tgz file in any directory.

• Go to jakarta-jmeter Directory (Directory in which the .zip of .tgz file is unzipped)

• Type ./bin/jmeter on command prompt (for Unix) or Run bin/jmeter.bat (for Windows)

• JMeter is ready to test application.

When you run jmeter.bat file in bin directory of jakarta-jmeter Directory, you will see the following JMeter Screen.

https://s3.amazonaws.com/bzimages/Blog+Post+Images/Getting+Started+with+JMeter+5.2.13/1.jpg

Creating and running scripts with Jmeter:

1. Go to “bin” folder of your JMeter distribution, double click “jmeter.bat” file

2. Simulate users by adding a Thread Group.

http://girliemangalo.files.wordpress.com/2009/03/thread3.jpg?w=300&h=129

http://girliemangalo.files.wordpress.com/2009/03/thread-group.jpg?w=595

• Set Number of threads(users) = 5, => the number of concurrent users we want to simulate.

• Set Ramp-up Period (in seconds) = 10, => the amount of time it will take to create the threads/users.

• In this example, Jmeter will create a thread every 2 seconds (10/5). If ramp-up period is set to “0″ or blank, Jmeter will create all the threads immediately.

• Set Loop count = 1, => the number of times to execute the test.

3. Simulate web requests by adding Sampler > HTTP Request

http://girliemangalo.files.wordpress.com/2009/03/add-http-request4.jpg?w=300&h=183

http://girliemangalo.files.wordpress.com/2009/03/http-request2.jpg?w=595

• Set a descriptive HTTP request name

• Set Server name or IP = http://www.yahoo.com

• Set Path = “/”, which is Yahoo Homepage

4. To help us analyze the results, add the following listeners

http://girliemangalo.files.wordpress.com/2009/03/add-listener1.jpg?w=300&h=290

• Listener > Aggregate Report

• Listener > View Result Tree

5. Save your script with .jmx extension

6. Go to Run > Start (ctrl + R)


Example of Jmeter Record and Play-

Your text to link here...(http://www.youtube.com/watch?v=zYAiBwJK1v8)