Monday, September 23, 2013

Performance Testing Notes

Now a days if we wants to become an expert in Performance Testing need to grab the knowledge on below concepts.

1) Performance Testing (includes the process we follow to perform the performance task and the tool which we use to automate the performance task)
2)Performance Engineering & Performance Tuning.

Why do we do Performance testing
To measuring the performance of a system and end user experiance by applying the production workload to pre deployment system.

End of the testing we should  be ready to answer the below question

Whether the application quickly enough responding for all the user who ever accessing
Whether the application able to handle the expected and beyond the expected user load
Whether the application is able to handle the no.of transactions required by th business
Under expected and unexpected user loads will the application is sustain or stable.
If it is go live whether we can assure that the user will have positive experiance.


General Software Development life cycle:

1) Requirements Gathering.
2) Analysis & Design.
3)  Coding or Development.
4) Testing.
5) Deployment.
6) Maintenance.

General Performance Testing Life Cycle:

1) Request for Proposal (RFP)
2) Statement of Work (SOW)
3) Discovery
4) Planning
5) Automation
6) Smoke Test
7) Final Test
8) Analysis and Report.
9) Retest if needed.

1) Request for proposal:
Client who needs performance testing their product will sent a request for proposal by giving a brief introduction about their company and also about their product as well. Sales team will analyze and Prepare a Statement of work based the client calls and Email communication happened during this face.

2) Statement of Work
This Document will highlights the statement of work,the tool,the User load,the kind of tests which we need to perform.and total number of scenario's (also called use case's)which we need to cover.

3) Discovery:
Once SOW is singed then it is the responsibility of the team lead to initiate the Discovery process.In this phase we will get more clarity on what is to be done and the application architecture,the exact scenario's to be automated,think times,User mix,Transaction mix and also if anything other then this specified in Service Level Agreement (SLA). In this face everything will be done/communicated through Email/Phone.
-> Once the Roles and Responsibilities are identified, it will be communicated to all the team members.
-> In this face Client side Proof of concept(POC)  will also identified.
-> Identify whether we can go with URL's or .exe
-> Identification of  Protocols.
-> Will identify the application functional behavior  by accessing  the URL's
-> Technical architecture along with development Technics.
-> Analyze the accessibility of the application(any VPN is providing to access the application or direct URL's).
-> This face will completed with in 3-4 days.
-> Once everything thing done.Lead will communicate to client about the expectations via Email.

Test Requirements of any standard performance test of any project will be always as below.

1) Application Architecture
2) V users load.
3) Business Scenario.
4) Tool.
5) LAN/VAN.
6) Test Environment.
7) Production Load.(if the application is already existing in production)
8) Production schedule(need to update it)
9) Workload

Application Architecture:
       Analyze the detailed architecture of an application to understand the supported tools along with the protocols
       Analyze the architecture along with the deployment technologies to monitor the servers during the load test execution.

V-Users Load:
Analyze the amount of maximum users load to be generated on server.
Step 1:
If Client defines expected user load to be kept on the server we will do the execution using the same.
Step 2:
If Client does not define the expected user load to be kept on the server then we will analyze whether the application is already existing on the production or it is newly developed one.

If  the application is already developed and in the production:
We need to collect the Production logs and Reports for each business scenario from production monitoring team to analyze the maximum users accessing the application in production for a total of 24 hours duration.
So that we can get an idea on what time peek load is generated and how many users' are accessing at that time.
If  the application is newly developed and it is not in the production:   
Under below methods we can analyze the V-user's load
1) Bench Mark
2) Stress Testing:

Bench Mark:
Similar kind of application tested previously 'test results' will be considered as a bench mark for the current application as well.

Stress Testing:
Test the application behavior by gradually increasing the  user load,until the application get crashed/server breaks.

Objective of Stress testing:
The objective of the stress testing is to identify the maximum capacity of the application at the given server.

Business Scenario:
-> Analyze the business scenario's which will be critical to the application.
-> Analyze the scenario's which will give more revenue.
-> Analyze the scenario's which will more frequently accessed

Step 1:
If Client defines type of the business scenario's which need to test then will do the execution using the same.

Step 2:
If Client does not define the type of the business scenario's which need to be tested,then identify the frequently accessed  scenario's and the scenarios which are critical to the application.These thinks will be identified by PFT team.

Step 2.1:
Need  to gather the information from domain expert or functional expert to identify the frequently accessed functionality.

Step 2.2:
Once  done with gathering the scenario's need to share the same by preparing a Scenario's Work flow Document to get an approval from them.

Step 2.3:
Client will  review and discuss with other project teams and finally the client will approve the list of scenario's which need to perform the test execution.

Note:-If the application is in the production then will collect the production logs and reports to identify the frequently accessed functionality in the production,based on the production analysis we will identify the performance scenario's..

Tool:-
Analyze the tool to be used for executing the business scenario's.

Step 1:
If Client decides the type of the tool  to be used then we will do the execution using the same.

Step 2:
If Client does not decide the type of the tool  to be used then we need to do the POC (Proof of concept).
For that identify the list of tools which are technically feasible for the given application.

While doing the POC need to remember the below things.

Step 1:
In order  to under stand the technical feasibility record and reply the script on multiple tools.

Step 2:
After performing recording and replying the script prepare a checklist along with the identified tools and send it to the client.

Step 3:
Now the client will analyze the commercial's of each tool and finalize which to be used for the project execution.

LAN/WAN:
Define the network behavior and to simulate the load from same network or from different netwrok

LAN Based performance testing:
If load generators and servers are configured with in the same network then it is called as LAN based performance testing. It is called private network

WAN Based performance testing:
If load generators and servers are configured in different  networks and accessed through internet then it is called as WAN based performance testing. It is called public network

Test Environment:
Analyze the type of the test environment will be using to doing a performance test execution.actually there are Development environment, QA Environment, Load Environment,Production Environment.

Step 1:-
We will do Performance testing execution on dedicated staging environment in pre-production

Step 2:-
The Client is expected to do the performance test  say an example 50% or 10% of the production users.

Production load:
Analyze the production v-users once the application go live in to environment.

Production schedule(need to update it):
Analyze the project schedule in detailed in phase wise,when to start and when to stop,with how many users we want run execution,and each scenario should have how many number of users everything should be decided here.
-> Generally everything will be shared by client.
-> Once the project is engaged we should prepare and share the performance questionnaire so that client will do walk through it.
-> Also this will be shared to all the Development team,QA team,Admin team,performance team,business team and also with client.

Workload:
Analyze the v-users load distribution across all the given scenario's.

4) Planning:
This phase Manger will prepare plan, he will calculates the no.of resources required ,and infrastructure required,once done with the plan it will be delivered to the client for each phase.

5) Automation:
what ever the scenario's which are identified in Discovery stage will be automated in this phase.

6) Smoke Test:
Once done with automating the script will be validating here,if anything goes wrong will be corrected as part of script.will also identify using script are we able to navigate each page when running the script

7) Final Test:
Here actual test(Load,Stress,Endurance,Volume,ETC..) will be conducted to know the bottle necks of the application.

8) Analysis & Report:
After Executing the script client & server side metrics will be analyzed as per the SLA(in scope) for bottle necks if any.and same thing will be communicated to client with a detailed report.

9) Re-Test
Need to do re-test if client requires.

Entry Criteria for performance testing:
The entry criteria for performance testing is the application should be functionally stable.

Introduction to performance test:

General Scenario for Banking application will look look this

Login To Application
A/C Info
Statement
Detail Statement
Logout

The above Scenario will converted into script,and all the virtual user's will be access be accessed that script across the geographical location.

By executing the above automated script with expected V-USER's(Virtual users) we can understand the Application/Server's behavior.

Learn Load runner Terminology

Vuser's:
Vuser's will simulates the real user's behavior/business logic using Vuser script with the help of load generator.

Load Generator:
Load generator is a component in any of the performance testing tool.it is useful generate the amount of Vuser's Load.

Vuser's script:
It contains the business logic/real user's action in an understandable and supported language.

Objective of Performance Testing:
The Primary Object of the performance testing is to find the response time of each user's action or page.

Types of performance test are:
1) Load Testing.
2) Stress Testing.
3) Endurance Testing
4) Spike Testing
5) Volume Testing.

Load testing:

1)  Load Testing: 
The test execution with a specified user load under given conditions. Major focus will be on system stability, response times and success and failures.

2) Stress Testing: 
The test execution where we continuously increase the load on the application until it crashes. Major focus will be on the threshold limit of users and response time is not at all considered.

3) Endurance Testing: 
The test execution where we load the application continuously for longer duration's like days or months to identify bottlenecks like memory leaks.

4) Spike Testing: The test execution where the application is loaded with varied user load suddenly (sudden increase and decrease) to check the system behavior.

5) Volume Testing: 
The test execution where we send the continuous data to the db to check whether it can handle that much volume of data at a time.

2 comments:

  1. Have a look for learning Performance testing.

    ReplyDelete
  2. Pretty good post about Software Testing Companies in New York. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts Software Testing Companies in Los Angeles. Any way I'll be subscribing to your feed and I hope you post again soon. Absolutely fantastic posting! Software Testing Companies in Dubai Lots of useful information and inspiration, both of which we all need! Really appreciate your work.

    Consult today: Software Testing Services in San Francisco

    ReplyDelete