Performance Testing, its types and using Jmeter with example, response codes and report

 Performance Testing

Types of Performance Testing

  • Load Testing

  • Stress Testing

  • Volume Testing

  • Capacity Testing

  • Spike Testing

  • Scalability Testing

Load: Testing speed of the system while increasing the load gradually  till the customer expected number.

Stress: Testing speed of the system while increasing/reducing the  load on the system to check any where its breaking.

Volume: Check how much volumes of data is able to handle by the  system.

Performance Testing process

Why load testing?

It evaluates the stability, speed or capacity of the system or component through response time in the application.


Test Details:

We will determine how many number of user access the website in reputed time. In test, we have defined number of Concurrent users targeting the application randomly.

What are the Tools available for Load Testing ?

-          JMeter

-          Postman

-          Tsung

-          Blazemeter

-          Soap UI

Why Jmeter ?

JMeter is a software developed by Apache and its main objective is Open Source tool due to its ability to support huge number of simultaneous users from a single machine or cluster of machine.

Can do testing on different server types - HTTP,  HTTPS, SOAP, Database via JDBC, LDAP, JMS, Mail - POP3(S) and IMAP(S).

Jmeter is Java oriented  application designed to load test functional behavior of the website and measure performance of the web application.

Jmeter results are generated in HTML format report and displays the summary of the test run.

Provides the total number of users performed action in reputed time and also percentage of pass and fail responses with graphical charts also available.

Supported OS : Linux/Ubuntu/CentOS, Mac, Windows

Configuration and Execution of Load Test

Load Testing performed by hitting the application of API in Jmeter by setting the Number of users (Thread) and duration of the time to hit the API.

For Example:

Number of Users         : 1000

Duration          :  300 seconds 

From above inputs, ‘n’ number of users started to access (hit) the api and continuously users hit the api and receive the responses.

Following are the common method types

Methods

Scope

POST

Create an object

GET

Fetch/request object

PUT

Update an object

DELETE  

Remove an object


Summary Report

# Samples is the number of samples with the same label.

# Average is the average time of a set of results.

# 90% Line (90th Percentile) meaning 90% of the samples took no more than this time.

# Min is the shortest time for the samples with the same label

# Max is the longest time for the samples with the same label

# Error % is the percent of requests with errors

# Throughput is measured in requests per second/minute/hour.

# Kb/sec - throughput measured in Kilobytes per second. Time is in milliseconds.

In the View Results Tree after run to check the exact response for the given request & check by selecting JSON Path Tester from the dropdown.

How to check the response is correct or not?

Following are the common response code


Status code

Scope

200

Success /ok

400

The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing)

Request error (like required validation)

403

Forbidden request(If authentication fails and the requested method type is not allowed)

404

Data does not exists - Not found

422

Unprocessable entity (When the field data is in improper format and unable to process the data for request)

503

Service Unavailable(For eg: when user

unable to delete the speed check network logs, it is because of server down due to maintenance)

504

Gateway timeout (for example , when user details get updated

in saas and not updated in magento request due to request processing timeout error)

500

Internal server error

HTML Report Screenshot

9 comments:



  1. This post is so interactive and informative.keep update more information...
    Important features of selenium
    Features of selenium testing tool

    ReplyDelete
  2. Fantastic blog!!! Thanks for sharing with us, Waiting for your upcoming data.
    why is python so popular
    why is python popular

    ReplyDelete
  3. Informative blog post on performance testing. Thanks for sharing this. Here are a few links for performance testers,
    QA Job Board
    Search QA Jobs
    Performance Testing Jobs

    ReplyDelete