100% found this document useful (1 vote)
396 views70 pages

Performance Testing

This document provides an overview of a software performance testing training course. It discusses topics like the types of software testing, functional testing vs non-functional testing, performance testing tools like JMeter, and different types of performance tests including load testing, stress testing, endurance testing, and spike testing. The document also covers setting up the JMeter testing environment and how to use common JMeter elements to create performance test scripts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
396 views70 pages

Performance Testing

This document provides an overview of a software performance testing training course. It discusses topics like the types of software testing, functional testing vs non-functional testing, performance testing tools like JMeter, and different types of performance tests including load testing, stress testing, endurance testing, and spike testing. The document also covers setting up the JMeter testing environment and how to use common JMeter elements to create performance test scripts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

PT Training Feb22 Batch

Class1:

Introduction and Course Syllabus Walkthrough

What is Software Testing ?

It is a process of verifying and evaluating the Software.

Software → it nothing but group of Business logic Code( java | C | Java Script | Python etc., )

Why do we need Software Testing ?

If software works fine/good. End User will attract to use the Software. So that brand value,
Trust and Revenue increases.

What are the Types of Software Testing ?

Majorly software testing is 2 types,

1. Functional Testing
2. Non-Functional Testing

1.Functional Testing:

In this Section, Tester will verify the Functionality of an application/Software as per the
design.

Example:

Valid case:
If you search in flipkart application, like “Apple”. Application should display apple products.
So that tester will confirm it functionally works fine.

Invalid Case:

If you search in flipkart application, like “Apple”. Application displays the different products.
So that the tester will confirm it functionally not works fine.

Testers will raise Defects/bugs in Software/Project Management tools. Like Jira / BugZilla /
ALM etc.,

Types of Functional Testing


1. Manual Testing → Defects
2. Automation Testing → Defects
Manual Testing → Here Tester will verify the application functionality manually.
Automation Testing → Here Tester will verify the application functionality using automation
tools using code.

Example: Selenium Tool or VSTS

Class2:

2.Non-Functional Testing:

What ?

In this section, Testers will verify the application in terms of Speed, Stability,
scalability and security.

Why ?

If software works fine/good in terms of speed, stability and scalability and security
End User will attract to use the Software. So that brand value, Trust and Revenue
increases.

Types of Non Functional Testing:

1. Performance Testing → testers will find the Bottlenecks


2. Security Testing → testers will find vulnerabilities
3. Failover Testing etc., →

1.Performance Testing:

What ?

In this section, Testers will verify the application in terms of speed, stability and
scalability under the Load and Stress Conditions.

Why ?

If software works fine/good in terms of speed, stability and scalability. End User will
attract to use the Software. So that brand value, Trust and Revenue increases.

How to do performance testing ?

We have a lot of PT Tools available in the market with the help of that we can perform
the Performance testing for all applications.

1. Apache Jmeter
2. Microfocus Load Runner
3. Neoload
4. VSTS
5. Blazemeter
6. Locust
7. Gatling etc.,

Class3:

Overview about PT Lifecycle

—------------------------------------------------------------------------------
1. POC | NFR ( Non Functional Requirements )
2. Test Strategy / Test Plan Documentation (10 %)
3. Workload Model
—-----------------------------------------------------------------------------
4. PT Scripting
5. Scenario Design and Execution Tools ( 80%)
—-----------------------------------------------------------------------------
6. PT Report Preparation Documentation (10%)
7. Analyse the PT Report and Find out the Bottlenecks
8. Recommend or Provide the Solutions for the Identified Bottlenecks

—------------------------------------------------------------------------------

Types of Performance Testing:

1. Load Test
2. Stress Test
3. Endurance Test
4. Spike Test
5. Volume Test
6. Scalability Test

Load Test:

What ?

The objective of this test is to verify if the application can able to handle the
maximum user load or not.

Why ?

In this Phase, we have to verify the application with maximum user load and
monitor the server during the test, how fast the server response and how is the
Server Utilization.

Stress Test:
What ?

In this Phase, The objective of this test is to identify the “ Breaking Point of an
application “.

Why?

Sometimes, User Load on to the server or application might be more.we have to


make sure application should be able to handle double the load or triple the load.

We have to verify the application with 2X , 3X , 4X User Loads and monitor the
server during the test, how fast the server response and how is the Server
Utilisation.

On-premesis / Physical servers: we have to follow below snippet approach….

Class4:

Endurance Test:

What ?

The objective of this test is to identify whether the “Application has any memory
Leakage issues or Connection Failures”.

Why ?
Sometimes users can access the application for a longer duration ( 8 | 12 | 16 | 20 |
24 | 36 hours) but few instances or Few applications have Memory Related issues
or Connection Failures (Session Timeouts or Reload the application). To
overcome those issues we are going to perform Endurance test.

Spike Test:

What ?

The objective of this test is “ to verify the application with unexpected user load “.

Why ?

In this Phase, we have to verify the application with unexpected user load and
monitor the server during the test, how fast the server response and how is the
Server Utilization.

Example:

Amazon Application

It has a lot of pages but if any one of the page has more traffic due to offers.So we
have to Simulate/Replicate the Production Scenario.

Volume Test:

What ?

The objective of this test is “ to verify the application with huge data points “.

Why ?

In this Phase, we have to verify the application with huge data points and monitor
the server during the test, how fast the server response and how is the Server
Utilization.

Scalability Test:

What ?

The objective of this test is “ to verify the application how maximum user load,
application can able to handle or not“.

Or
The objective of this test is “ to verify the application with future expected user
load “.

Why ?

In this Phase,we need to apply the load on to the application, to verify how
maximum users can able to handle ( Threshold factors) and also monitor the
server during the test, how fast the server response and how is the Server
Utilization

NFR ( Non Functional Requirements ) :

As part of Non Functional Requirement, we have to collect the below key metrics,

Understand the Core business of application, Critical Business Transactions


(CBT’s), Peak Hour Statics like Concurrent users, TPH ( Transaction per Hour ),
Half Peak Hour Statics like Concurrent users, TPH ( Transaction per Hour ), Types
of Testing, Environment Information like Application Architecture | Server
Resource Threshold Limitation ( % CPU, %memory, % heap, % disk etc.,), If any
existing Performance Issues, SLA/Benchmark etc.,

Class5:

Test strategy/Test Plan:

Test strategy → procedure and approach

Test Plan:
1. Objective of Test plan
2. Scope
i). In-scope
ii).Out of scope
3. Environment Information
4. Entry Criteria
5. Exist Criteria
6. Types of Testing
7. Workload Model
8. Risks and mitigation
9. SLA
10. Conclusion

Class6:

JMeter download and Installation Process:

1. Go to the internet and Search for “ Jmeter Download for windows “.


2. Click on Official website “ https://jmeter.apache.org/download_jmeter.cgi “
3. Click on the latest version of Apache Jmeter . zip file which is under the
Binaries Section.

4. We has to unzip the downloaded file.


5. We have to go to the “jmeter bin folder” and double click on “Jmeter windows
batch file”

If you want to run Jmeter windows batch file, In Laptop/Desktop Java Software Should be
mandatory.

How to verify java is available or not ?

1. Search as cmd
2. Java -version
How to install java ?

1. Search on the internet as a “ java download for Windows “.


2. Click on official website “ https://www.java.com/download/ie_manual.jsp “
3. Click on ”Agree and start free download”.
4. Goto the Download folder and Select the java.exe.
5. Right click on java.exe file and “ Run as Administrator ”.
6. Restart the Machine
7. Verify Java version using command.

How to install an old version of Jmeter Tool ?

We can install the old version of Jmeter under the Apache Jmeter Archives Section.

Jmeter Environment Variables Setup:

1. Right click on This PC and Click on Properties


2. Click on “ Advanced System Settings ” or search as a “ Advanced System
Settings “
3. Click on “ Environment Variables “
4. Add Variable name and Variable value refer below snippet.
5. Click on ok.
Class7:

6. Overview about Jmeter elements:

How many ways can we open a Jmeter Tool ?

We can open Jmeter tool 2 ways,


1. Manually we have to run batch file.
2. We can open using CMD ( Command prompt)

Jmeter tool has a 2 modes


1. GUI Mode ( Graphical user interface )
2. NON-GUI Mode

1.GUI Mode:

This mode we will use Script Recording | Script Debugging | Scenario Execution

2.Non-GUI Mode:

This mode will use only Scenario execution purpose.

Why Non Gui Mode is preferable for Scenario Execution ( Load Test | Stress Test |
Endurance Test etc.,) ?
In GUI mode → In order to View the Scenario Execution Results, we need to add
Listeners but Listeners are occupying more memory.

In Non-GUI Mode → No need to add any listeners to view the scenario execution
Results. Why because the Jmeter tool Non Gui mode has an algorithm to generate
Scenario Execution Results file (.jtl).

Control + c → copy
Control + V → Paste
Control + X → cut
Control + Z → undo
Control + Y → redo

Class8:

PT Scripting:

Prerequisites:
1. Understand the Business Flow Steps and Critical Use Cases.
2. Record the Business Flow using PT Tool.
3. Debug the Script ( Correlation | Parameterization | Assertions/Check Points)

Example:

Flipkart Application:

Search Product
Purchase Product
Track the order
Return/Replace Order
Chat with Customer Care Representative
Register User

Purchase Product: → Use Case | Business Case

1. Launch the Application


2. Click on Login
3. Search Product
4. Select Product
5. Click on AddtoCart
6. Click on Cart
7. Click on Place Order
8. Click on Delivery Here
9. Payment
10. Click on Logout.
Phonepay:

1. Send Money to Mobile number


2. Send Money to Bank Account
3. Scan Payments
4. Mobile Recharge
5. Insurance Payment
6. Send money to UPI ID
7. Bill Payments
8. View Payment Details
9. Contact the Phonepay Support Team.
10. Register User
11. Reset UPI PIN

Send Money to Mobile number:

1. Click on “ To Mobile Number “


2. Enter Mobile Number or Search mobile Number
3. We can select Account
4. Enter Amount and Click on Send
5. Enter UPI PIN & Click on Submit

Class9:

Petstore Application:

https://petstore.octoperf.com/actions/Catalog.action

1. Register User
2. Purchase Product
3. View Order

Register User:
1. Launch the Application
2. Click on Sign In
3. Click on RegisterNow
4. Click on SaveAccountInformation

Purchase Product:
1. Launch the Application
2. Click on Signin
3. Click on Login
4. Click on Search
5. Select the Search Product
6. Select the ItemID
7. Click on AddtoCart
8. Click on ProceedtoCheckout
9. Click on Continue
10. Click on Confirm
11. Click on SignOut

View Order:
1. Launch the Application
2. Click on Signin
3. Click on Login
4. Click on MYAccount
5. Click on MyOrders
6. Select the OrderID
7. Click on Signout.

Record the Business Flow using PT Tool:

Example:

Flipkart : I want to verify the application performance with 1000 Concurrent Users.

1. 1000 Employees
2. Every employee should have Laptop/Desktop/Mobile.

1000*50000=50000000 = 5 cores
1000*30000= = 3 cores

PT Tool Is coming into the Picture.

The Purpose of Record the application using PT Tool to create the Scripts.The
scripts will helpful to generate Virtual User Load on the Servers.

Script is nothing but the Combination of Business Logic code.

How to Record a web application using JMeter Tool. ?

Class10:

Recording Process :

Prerequisites:

1. Delete Browser History and Cookies and Caches.


2. We need to set up a Proxy ( Proxy Port NUmber and JMeter Port Number
should Same ).
3. We need to add JMeter Root CA Certificate into Browser.
JMeter Recording Process:

1. Click on Start Button which is Under the “Https Test Script Recorder”.
2. Open Browser
3. Navigate the Business Flow with Proper Transaction Names.
4. Click on Stop
5. Take Backup the Recording.xml file ( Which available in Jmeter Bin Folder).
6. We have to Remove if any unwanted Requests are available in JMeter
Script.
7. We need to Enable the Generate Parent Sample for every Transaction
Controller.

Scripting and Debugging:


1. Record the Business flow
2. Correlation
3. Parameterization
4. Assersations/Check points.
5. Think Time
6. Error Handling ( Optional )

What are the Prerequisites to Record an Application ?

1. You have to be very clear about the Business Flow.


2. Before going to record an application we have to verify or navigate the
Business Flow manually.

Jmeter Recording Process of a web application ?

1. Jmeter Tool is a Proxy based Recording Tool.

What is Proxy ?

It is nothing but an Agent and also it establishes the connection between 2 servers.

How to Setup Proxy ?

1. We have to Open Browser Settings


2. Search Proxy and Click on Network Settings

3. Choose Manual Proxy and provide the Name and Port Number ( As same as
Jmeter Port Number ) and Click on Ok.
In Order to Record the Secure application (HTTPS) we have to add Root CA Certificate
into the browser.

How to generate a Root CA Certificate ?


foewi8
1. We have to open the Jmeter Tool and Choose Recording Template from the
templates.
2. Enable the Https Test Script Recorder
3. Click on Start Button in Https Test Script Recorder
4. Pop will display and Click ok.
5. Click on Stop.

Note: Jmeter Root CA Certificate valid for 7 days only

How to add Root CA Certificate Into Browser (Mozila) ?

1. Open Browser Settings


2. Search as “Cert”
3. Click on View Certificate.

4. Click on Import (under the Authorities Tab).

5. Select Root CA Certificate from the Jmeter Bin Folder.


6. Click on Ok.
Note: Before going to record an application we has to clear the browser History.

Recording Steps:

https://petstore.octoperf.com/actions/Catalog.action

1. Open Jmeter Tool


2. Select Recording Template from the Templates
3. Enable the Https Test Script Recorder.
4. We have to Setup the Proxy.
5. We have to add a Root CA Certificate ( Only if the certificate Expires ).
6. Click on Start Button in the Https Test Script Recorder.
7. Open Browser manually
8. Provide the Business Flow Steps (Launch Url | Login | Click on Search etc.,
and Navigate the Business Flow
9. Click on Stop Button.

After the Recording an Business Flow,

1. We have to remove unwanted Requests/Transactions/Controllers in jmeter


script.
2. We need to take the back up of a Recorded Content File ( recording.xml ).
3. We need to enable Generate Parent Sample ( To get the page Level/Transaction
Level response ).

Class11:

As part of script debugging we have to do below actions

1. Correlation
2. Parameterization
3. Assersations
4. Error Handling ( Optional ).

Correlation:

What ?

As part of Recording the Business Flow we will get the Dynamic Values or Server
Generated Values from the Server those Values we need to be handle Using
Correlation Concept.

How to Identify the Dynamic Values ?

We need to record the Business Flow Twice ( 2 Times ) and Compare Manually
each and Every Request.
Why ?

Dynamic Values are very unique User to user and session to Session

How ?

Class12:

/actions/Account.action;jsessionid=B5CE79E968C052EFAA1F010F0B383317

/actions/Account.action;jsessionid=A9EB6119A27855F2D4DD2CDFDB67414C

jsessionid=A9EB6119A27855F2D4DD2CDFDB67414C"><img src

→ LB → | → Dynamic Value → | → RB →

jsessionid=(.*?)"><img src

1. Identify the Dynamic


2. Identify the LB and RB of Dynamic Value with help of Recorded Response.
3. We need to write Regular Expression ( jsessionid=(.*?)"><img src ) and
Verify the Expression working fine or not.
4. We need to add Regular Expression Extractor to the which request gives
the Response( Dynamic Value Response ) in the Jmeter Script.

5. We have to provide all the info as mentioned in the below Screenshot.

6. We have to replace the dynamic value with name of Created variable name
Class13:

Revision Class of Correlation.

Class14:

In Regular Expression Extractor,

Match Number has a 3 Types

1 → If you keep, Match Num as a 1. It will pick the 1st Match Occurrence Value.
0 → If you keep, Match Num as a 0. It will pick the Random Match Occurrence
Value.
-1 → If you Keep, Match Num as a -1. It will Pick all the Match Occurrence Values.

Note:
If Match Count is 1 → You have to put match no. as a 1 in Regular
Expression Extractor.
If Match Count is more than 1 → You have to put match no. as a 0 or -1 in
the Regular Expression Extractor.
If you want to pass specific occurrence Value we need to put Match no. as
a -1 .
Class15:

Advance Level of Correlation:

<input type="hidden" name="_sourcePage" value="(.*?)" /><input type="hidden"


name="__fp" value="(.*?)" /></div></form> Need a user name and password

In case, If you want pick 2 values using one Regular Expression, Template value
should be $1$$2$ then 1 st value will be store in Group1 ${name of created
variable name_g1} and 2nd value will be store on Group2 ${name of created
variable name_g2}

In case, If you want to pick a specific occurrence value using Regular expression,
Match no. should be -1. 1st occurrence value will be stored ${
Name of created variable_1} | 2nd occurrence value will be stored ${
Name of created variable_2} | 3rd occurrence value will be stored ${
Name of created variable_3}........etc.,

Class16:

Parametrization:
What ?

As part of recording business flow, whatever the values entered via Keyboard
those values we need to do parameterize.

Why ?

In order to Replicate Production Scenario or Realistic Scenario with help of


parameterization Concept.

How ?

We need to identify what are the Field Values we entered via Keyboard.
1. We need Create New .CSV File or Text File.
2. We need to add Data with proper header names.
3. Go to the Jmeter Script, Right click on the Test plan and add “ csv data
config element “ .

4. We need to browse the Test Data csv file or .txt file from the Csv data set
config element.
5. Replace the Value in the Script with the Variable Header name. ${variable
name}.

Recycle on EOF:
If data can be Reusable you can choose as a “True”.
If data can’t be Reusable you can choose as a “False”

Stop Thread on EOF:


If Recycle on EOF is a “True” → Stop thread on EOF as a “False”.
If Recycle on EOF is a “False” → Stop thread on EOF as a “True”.

Class17:

Assersations:

What is Assertions?

It is used to verify the Sampler Response or Server Response.


Why ?

In Jmeter tool, Some Requests/Samplers may not get the Expected Response but
it is showing as a Pass Status.to overcome this we need to use Assertions.

How to add Assertion ?

1. We need to copy the proper Text from the Sampler Response.


2. Then we need to add Response Assertion of the Sampler.

3. Add the copied Text to the Assersation refer below screen shot for refernce.
Class18:

How to create Jmeter Script without Recording ?

Note: Some of the Office Laptops or Client Vdi’s we are not able to set up the Proxy due to security
Reasons.

Steps:
1. In Chrome Browser, Take New Tab and Right Click on Select inspect.

2. Click on Network and enable the Preserve Log option.

3. Navigate the Business Flow in New Tab.


4. Click on Export Har Option.

5. Search on the Internet as a “ har to jmx “.


6. Select official Website ( https://converter.blazemeter.com/ ).
7. Upload downloaded Har file and Click on Convert.
8. Click on “ Download Jmx”.
Class19:

How to debug Script ?

1. Identify the Dynamic Value.


2. Copy the Dynamic Value and Search in the Dev Tool.
3. From Search Dev Results, select 1st Request or occurrence of Hightleted Response Data.
4. Identify the LB and RB of the Dynamic value.
5. Write Regular expression and Do Correlation process.

Class20:

How to add plugin manager and Plugins ?

What is Plugin Manager ?

It is nothing but to add the additional Features to the Jmeter Tool. Which helps the
Performance Testing Implementation of a project.

Why ?
Jmeter Tool has less/Limited features compared to the other competitor PT Tools Like
LoadRunner,Neoload etc.,.

How ?
1. Goto the internet and Search as a “ Plugin manager for Jmeter”.
2. Select the Official Website ( https://jmeter-plugins.org/wiki/PluginsManager/ ).
3. Click on Jar File.
4. Once Downloaded the Jar File. we have to place the Jar file lib -> ext folder

D:\JeevaSoftwareTraining\Pt_Training_Feb22_Batch\apache-jmeter-5.4.3\apache-jme
ter-5.4.3\lib\ext

5. Restart or open the Jmeter.

What is Plugin ?

It is nothing but a group of business logic code.

Why ?
Plugins will be helpful to implement the Realistic Scenario or to add the additional
Features to the Jmeter tool.

How ?
1. Open the Jmeter tool and Click Plugin manager under the options tab.
2. Click on available Plugins.
3. Select or Search all required plugins and Click on “ Apply Changes and Restart
Jmeter “.

List of Plugins most commonly used in jmeter tool,

1. Custom Thread Group


2. Synthesis Report
3. Random CSV Data Set Config
4. 5 Additional graphs
5. Perfmon
Workload Model:

Flipkart:

1000 orders per hour → 100 TPH( Transaction per hour ).


Concurrent User → 100 or 50 0r 10

Example:

Users = 10
TPH = 100 orders
1 user has to make 10 orders

1 Hour = 60 mins = 3600 secs

To make 1 order = 1 * 5 = 5 secs


To make 10 orders =10 * 5 = 50 secs

3600-50= 3550 secs

Pacing = Remaining Time/ No. of orders per user


= 3550/10
= 355 secs

Class21:

Think Time:

What ?

It is nothing but a time delay between the 2 User Actions / Transactions.

Why ?

To replicate the Production or Realistic user Behaviour.

Simple Applications, we can use 3-5 secs Think Time.


Medium Applications, we can use 5-7 secs Think Time.
Complex Applications, we can use 7-10 secs Think Time.

Pacing:

What ?
It is nothing but a time delay between the 2 Iterations.

Why ?

It will be helpful to Control the Transactions(TPH).So that Server got some free time or
breathing time to process the Request.

How to do pacing Calculations?

Pacing = ( Target Time - Execution Time per user ) / No. of Iteration per user

Example1:

Users = 10 | TPH = 100 | Iteration Response Time = 60 secs

No. of Iterations Per user= Target Transactions/No. of users =100/10= 10 Iterations

Execution time per user=No.of iterations per user*Iteration Res Time= 10*60=600 secs

Pacing = ( 3600 - 600)/10


= 300 secs.

Example2:

Users = 10 | TPH = 1000 | Iteration Response Time = 10 secs

No. of Iterations per user = 1000/10= 100


ET per user = 10*100=1000

Pacing = ( 3600-1000)/100
= 26 secs

Example3:

Users = 20 | TPH = 50 | Iteration Response = 20 secs

No. of iterations= 50/20= 2.5 iteration


Execution Time = 2.5 * 20 = 50 secs

Pacing = ( 3600-50)/2.5
= 3550/2.5
= 1420 secs.

Example4:
Users = 22 | TPH = 1050 | Iteration Response time = 7 secs

Pacing= 69.48 secs


= (3600-334)/47.72
= 68.44 secs

Example5:
Users = 10 | TPH = 1000 | Iteration Response Time = 10 secs | Duration = 30 mins
In above case we need to reduce the Target Transactions Value.

Users = 10 | TPH = 1000 | Iteration Response Time = 10 secs | Duration =2 Hours


In above case we need to increase the Target Transactions Value.

Class22:

GUI Mode Execution Prerequisites:

● Make Sure Script Working Fine with Single user


● Need to understand the Workload Information of Business Flow
● Gather Required Test Data.
● Make sure Test Data works fine.
● Make sure pacing should be added.

Scenario Design and Execution:

1. Load Test Scenarios

Iteration Response Time: 25 secs | Users = 10 | Target Transactions per 10 mins =


100

Pacing = 35 secs.
Class23:

Now days BGV is very Strict, to overcome this,

Consultancy Details:

If you want to decide guinenu Certificates,

Documents - 25k

Normal Process:
1.They will create Salary account.
2. For suppose if you want keep 5 Lakhs is the Current CTC, based on this they
will release an offer letter. They will mention Salary Structure.

Monthly NET Salary: 50000/-

Salary rotation charges,

Professional Tax : 200 per month


Salary Credit charges: 500 per month (GST).
PF = 300 per month + PF Amount (2000)

Every Month ends 30th 0r 31st . you have to send an amount to the consultancy
Team.They will Credit salary to your account 1st to 5th of every month.

Total amount: 50000+ 1000+ 1800 = 52800 /-

You will get,

1. Proper Bank Statement


2. Form16
3. PF Account.

Yearly once means 01st April to 31st March


Form 16 = as per package+ 1000 / Filing

Non-GUI Mode Execution Prerequisites:

● Make Sure Script Working Fine with Single user


● Need to understand the Workload Information of Business Flow
● Gather Required Test Data.
● Make sure Test Data works fine.
● Make sure pacing should be added.
● We need to disable the Listeners.

NON-GUI Mode Command:

Jmeter.bat -n -t -l
Jmeter.bat -n -t ( jmx file path) -l ( .jtl file path /Jmeter Results Path )

jmeter.bat -n -t
D:\JeevaSoftwareTraining\Pt_Training_Feb22_Batch\Purchase_Order.jmx -l
D:\JeevaSoftwareTraining\Pt_Training_Feb22_Batch\Results\NonGUIMODE\LoadTEST
_24032022.jtl

NON GUI Mode Execution is preferable in case of Huge Concurrent Users. Why because
in NON GUI Mode Execution doesn’t requires any listeners due to that it will consume
the less memory or storage.

Task:

1. Please do Stress Test and Endurance Test

Let x =10 users


Load Test : 10 users → 1*x = 10 users
Stress Test: 20 users → 2*x = 20 users
Endurance Test : 1X = 10 users | Duration 30 mins

Class24:

How to Analyse the Test Execution Errors and PT Report Preparations. ?


1. If you see any errors during the Test Execution. We have to check the
below items,
● Response Code
● Response data
● Request data. → Parameterized data | Correlation data

How to Prepare a Test Report ?

1,2,3,4,5,6,7,8,9,10

Average = 55/10= 5.5


Median = 5.5
90th Percentile = 9
95th Percentile = 9.5
Minimum = 1
Maximum = 10

We called Launch url Transaction 100 Times out of 90 times got succeed and 10 times
got errors. What is the Error % ?

Error % = 10

Class25:
Overview about Developer Tool.

Discussed All Tab Options.

Advantage Developer Tool:

Developer tool Capture all the Applications or Webpages data..


With help of the above data we can easily identify the Application Issues and also will
helpful to meet the client expectations.

Class26:

Revision Class:

LoadTest → 1 Hour
Stress Test → 2X / 3X /4X / 5X →Cloud Servers like AWS / Azure / Aquia cloud etc.,
Stress Test → No time —> Physical Servers/on premises servers.

Endurance Test → 8/12/16/24/36 hrs

Class27:

Realtime Project Overview:

1. We need to set up a meeting with the Project team. Test manager | Architect |
Test Lead | QA Lead.
2. Could you please provide a PT Scope of an Application/Project.
3. Gather the NFR Details of an application from the Product Owner.
4. Based on NFR Details we has to prepare Test Plan.
5. Scripting and Scenario Design.
6. Scenario Execution.
7. Prepare the PT report.
8. Analyse the PT Report and Provide Observations/Recommendations for the
Performance issues.

Class28:

Pending Items
Correlation issue in Loadrunner Tips.

Overview of Postman Tool and Installation Process ?

Installation Process:

1. Search in Internet as a “ Postman download for Windows”


2. Select official Website “ https://www.postman.com/downloads/ “
3. Click on “Windows 64 bit” for windows laptops.
4. Double click the Download Postman file.
5. Click on “ Skip and go to the application “.

What is a Postman Tool ?

It is a Tool which is useful to Test the Api’s.

What is API ( Application Programming Interface )?

It is a mediator to communicate between the Application Server and Database Server.

Example:

Phonepe :

Phonepe purely worked on UPI Network. UPI will maintain all bank Accounts of a User.

Example:

Jeeva → Vijay

1. Both of them should have a UPI Account/Phonepe Account.


2. Bank Account should be added to that UPI Account.
3. Jeeva has to maintain enough balance to transfer.
Nowadays most of the Web applications have a Rest Architect. So Api Testing is more
significant for all Rest Architect Applications. All the Mobile Apps worked based on API
Architecture only.

Rest Architect Applications:

Example:

If we click on Any Product Category like a television in Flipkart, Flipkart Web Server
will Invoke Respective APi’s and Respective API’s will invoke Respective Queries.
Queries will fetch the data from the database and give it to the API and Api will display
the data in a Web Server.

Api data will provide by the developer in the form of,

1. They might share API List in the WORD/XL files.

API details like


Method
Endpoint/url
Query Parameters
Body data
Headers
Expected Response

2. They might Share API List details in the form of Json Files.
3. They might share API Repository Location like Swagger/GIT etc.,.

Class29:

https://petstore.swagger.io/
Api Testing in Jmeter Tool. ?

1. 1st we need to understand the API from the Developer/Functional Lead.


2. We need to Verify manually, if the API is working fine or not.
3. Then we have to Convert or create a Jmeter Script. Kindly Refer below Snippet.

https://petstore.swagger.io/v2/user

Error Codes:

100 → Request Sent to server Successfully


200 → Received Response from the server Successfully
300 → Received Response but its redirected
400 → Bad Request
500 → Internal Server Error

Load Runner Training
Class01:

Overview about LR and its installation Process ?

● It is a Performance Testing Tool and it is a Commercial tool to Test All Kinds of


Applications( Web, Mobile and Desktop) .
● It is a product of Microfocus Company .
● Initially it was developed by Mercury and then acquired by HP then Acquired by
Micro Focus .

Load Runner Comments:

It has majorly 3 Components,


1. Vugen
2. Controller
3. Analyzer
—-------------------------------------------------------------------
4. Agent Process
5. Load Generator

Vugen ( Virtual User Generator ) → It is used to create the PT Scripts and Customise
the PT Scripts ( Recording and Debugging ).It will support Single User only.
Controller → It is used for Scenario design and scenario Execution.
Analysis → It is used to analyse the PT Results and to generate Custom PT reports.
Agent Process → It will help to establish the connections between Controller and Load
Generator.
Load Generator → It will be helpful to generate the Virtual User Load.

LR Installation Process :

Kindly Download LR Tool Zip file from Google Drive and Follow the steps which are in
the Loadrunner installation process document.

Minimum Prerequisites:

1. Your laptop should have at least 8 GB RAM.

Class02:

Difference Between Jmeter and Loadrunner ?


Jmeter:
1. It is an open source tool.
2. It is a pure proxy based recording tool.
3. It is a single component.
4. It supports very few protocols (9+).
5. In jmeter will generate a limited PT Report.
6. PT Scripting and Debugging has a little Complex.
7. Automatic Correlation is not available in Jmeter.
8. Jmeter tool developed using Pure Java Language.

Loadrunner:
1. It is a commercial tool.
2. It is a both proxy and non proxy based recording tool.
3. It has a 3 Components ( Vugen | Controller | Analyzer ).
4. It supports 80+ Protocols.
5. LR will generate Customised PT Report.
6. PT Scripting and Debugging is easy.
7. Automatic Correlation is available.
8. LR Tool is developed using C Language.

Discussed VUGEN Options:

Class03:

Recording Process in LoadRunner Tool.

PreRequistics:

1. Manually we need to verify the Application Functionality.

Recording Process:

1. Click on the Recording button.


2. Provide the Below snippet details like Url address, Application
3. Click on Recording Options and Choose HTML Mode and Select below Snippet
options.

4. Click on Ok.
5. Click on Start recording
6. We need to provide proper transaction Names and Navigate the business flow.
7. Click on Stop Button.

Url Mode based Scripting:

● For windows Application we need to choose “ Url mode” and Choose option as a
Use “ web_Custom_request only “.
● Some of the web applications, we could not able to generate the Script in HTML
Mode. Those applications we need to try with URL Mode.

Example: Front end Angular applications.

URL Mode VS HTML Mode:

● In url mode based script will generate more lines of scripts compared to HTML
Mode.
● In url mode based script is complex to read the Script compared to HTML Mode

Create LR Script without Recording ?

1. Click the New tab and Start Developer Tool.


2. Enable Preserve Log option in developer tool.
3. Navigate the business flow and Click on Export to har file.
4. Open the har file using Vugen.

Discussed to convert Script HTML to URL and URL to HTML.


Class04:

How to do Correlation ?

1. We need to identify the dynamic value.


2. Copy the dynamic value and keep the cursor on top of the script.
3. Press Control F Paste the copied dynamic value and Enable Sanpshots option.
Click on Find Next.

4. Copy the LB and RB of the dynamic value.


5. Write the Correlation Function and Provide the necessary details. Click on OK.
6. We have to save script and Replay script and verify Correlation function picking
correct value or not.
7. Replace the Dynamic value with parametername ( {Parametername} ) |
(Control H).
Class05:

How to Pass Value Randomly in Vugen ?

lr_save_string(lr_paramarr_random("C_Category"), "RandCategory");

Class06:

Page Validation / Assersations / Text Check Points:

1. Goto the Snapshot View.


2. Click on the Request in the script and Select the Valid Text from the Response

3. Right click on selected Text and Click on “Add Text Check Step”.

Class07:

Automatic Correlation:

With the help of a Design studio we can do Automatic Correlation.

Parameterization:
1. Select the Value and Right Click on the Value and Choose Replace With
Parameter.

2. Click on “ Create New parameter “


3. Provide Valid Name and Click on Ok.

Parameter Types:
1. File → Most commonly used one
2. Date/Time → with help of this we can pass the Current/Past and Future Date
and Time.
3. Iteration Number → it is useful to pass the Iteration Num in the script
4. Random Number → it is useful to pass the Random Number
5. Unique Number → it is useful to pass the Unique Number
6. VuserID → It is useful to pass the UserID
7. Table → it is useful to use one file for multiple columns data or different set of
data.

Class08:

Parametrization Properties:

Sequential - Each Iteration → Data will pass sequentially on the iteration level. Like
iteration 1 all users taking 1st row data and iteration 2 all users are taking 2nd row data
etc.,

Sequential - Each occurrence → Data will pass sequentially on the occurrence level.
For Example: in my script one of the fields has 2 places/occurrence. 1st iteration users
will pick 1st row data for 1st occurrence and 2nd row data for 2nd occurrence.

Sequential - once → Data will always pass 1st row data for all iterations and all users.
Like iteration 1 all users taking 1st row data and iteration 2 all users are taking 1nd row
data etc.,
Random - Each Iteration → Data will pass randomly for all iterations and all users.
Random - Each occurrence → Data will pass Randomly for all occurrences and all
users.

Random - once → Data will pass randomly for all users and the same data will use all
iterations of a user.
Unique - Each Iteration → Data will pass unique on iterations and all users. If enough
data is not available we can choose Abort User | Continue with Last value | Continue
cyclic manner based on Requirement.
Unique - Each occurrence → Data will pass unique for all occurrences and all users.

Unique - once → Data will pass unique for all users but not iteration level. Same user
data will be used for all iterations.
Class09:

Runtime Settings(RTS):

What are the RTS options available in LR ?

1. Run Logic
2. Pacing
3. Log
4. Think Time
5. Miscellaneous
6. Browser Emulation
7. Speed Simulation
8. Proxy
9. Preferences

What are the RTS options will you use in VUGEN ?


1. Run Logic
2. Log

What are the RTS options will you use in the Controller ?

1. Log
2. Pacing
3. Think Time
4. Miscellaneous
5. Proxy
6. Preferences

What is the difference between Web_reg_save_param_ex and


Web_reg_save_param_regex ?

Web_reg_save_param_ex → It is a Boundary based Function

Web_reg_save_param_regex → It is an expression based Function.

Class10:

Web Functions and LR Functions

web functions → this functions is useful to handle the customization the LR Script and
also it will helpful to Communicate the Server to each other like Correlation etc.,

Web Functions:

1. Web_url
2. Web_reg_save_param_ex
3. Web_reg_save_param_regex
4. Web_reg_find
5. Web_Submit_data
6. Web_Submit_Form
7. Web_Custom_Request
8. Web_Rest
9. Web_Cleanup_Cookies
10. Web_Cache_Cleanup
11. Web_set_max_html_param_len
12. Web_set_user

LR Functions → These functions are Tool Functions that are useful to Customise the
Script.
LR Functions:

Lr_save_string
Lr_paramerr_Random
Lr_start_transation
Lr_end_transaction
Lr_think_time
Lr_save_timestamp
lr_rendezvous

Controller:

Manual Scenario:

Here we has to Design the scenario like Number of Users | Ramp Time |
Duration | Ramp Down Time etc., Manually.

Goal Oriented Scenario:

Here Tool has Design the Scenario Like Numbers of Users | Ramp Time |
Duration | Ramp down Time etc., based on Goal Type.

By Number → here we have to provide no. of Vusers for individual Script.

Percentage Mode → Here we have to provide no. of Vusers for all the Scripts
but based on Percentage.it will allocate Vusers for a script.

What are Goal Types

1. Transaction Response Time


2. Transaction per Hour
3. Number of Users
4. Pages per minute.
5. Hits per Sec.

Register User → X concurrent user -> X TPH


Create Order → X concurrent user -> X TPH
View Order → X concurrent user -> X TPH

Manual Scenario:
Scenario Schedule:

Schedule by Scenario - Realworld Schedule


Schedule by Scenario - Basic Schedule
Schedule by Group - Realworld Schedule
Schedule by Group - Basic Schedule

Scenario -> All scripts has a only one Scheduled ( ramp up, duration and ramp down)
Group -> Each script has a own scheduled ( ramp up, duration and ramp down)

Scheduled by Scenario - Real world Schedule -> Multiple Ramp ups, multiple Duration
and Multiple Ramp down

Scheduled by Scenario - Basic Schedule -> Single Ramp up, single Duration and single
Ramp down

Scheduled by Group - Real world Schedule -> Multiple Ramp ups, multiple Duration and
Multiple Ramp down (each script)

Scheduled by Group - Basic Schedule -> Single Ramp up, single Duration and single
Ramp down (each script)

Multiple Scripts:

Search Product: 10 users, Target transaction : 100 Duration: 10 mins


Create order: 20 users, Target transaction : 300 Duration: 20 mins
Register user: 5 users, Target transaction : 50 Duration: 5 mins

Class11 & Class12:

Pacing:
FIxed pacing: Fixed delay

Pacing = 5 secs

For example: iteration 1 completed then it wait 5 secs and then it will go for Next
Iteration

Interval pacing:

Pacing = 5 secs

For example: every 5 secs 1 iteration will happen

Pacing Calculation:

Create order: 10 users, Target transaction : 50 Duration: 5 mins | Iteration Response Time =
7 secs

Fixed pacing: 53 secs

Interval pacing: Target Time/No. Of iterations per user = 300/5= 60 secs

Load Test:

If More than a 1 script -> you should Choose Scenario Type as a Group and Run mode as
a Real world Schedule or Basic Schedule.

Steps for design Load Test:


1. We need to add Script into Controller
2. We need select Scenario Type and Run Mode
3. We have to Design the Scenario like Number of Vusers | Ramp Up | Duration | Ramp
Down.
4. We have to open RTS ( Run Time Settings) and Choose Mandatory RTS Settings.
5. Pacing

6. Logs

7. Think Time

8. Miscellaneous
9. Preference

10. Click on Save and Close.

Design Tab → It is for Design the Scenario like Load test | Stress | Soak etc.,
Run Tab → It is for to Run the Scenario and Monitor the stats.

Class13:
Users= 20
Iteration Response = 37 sec
Duration = 600 sec
TT = 100
Pacing = 83 sec

Tasks:

Load Test:

Users = 10
Duration = 10 mins
TT = 100

Stress Test:

Users = 20
Duration = 10 mins
TT = 200

Endurance Test:

Users = 10
Duration = 30 mins
TT = 300

Scripts:

Purchase Order
View Order
Purchase Ticket
Purchase Product
Correlation Challenge for moderate

Class14:

How to Analyse the Test Summary Report ?


Class15:

Rest API Testing:

https://petstore.swagger.io/

REST Api Testing using LR Tool

1. Open Vugen
2. Click on New Scripts and Solutions
3. Select Protocol ( web protocol ) and provide the proper script name.
4. Right click inside the Action and select insert → Rest API
5. Provide Api Details Like Url | Method | Parameters | Body | Headers etc.,
``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````

Class16:

Realtime Project Overview:

Class17:

Overview about Application Architecture:

What is a Server ?

The combination of software and hardware is nothing but a server.

Hardware Components ( Processors/Controllers/chipsets) -> Kernel Source →


Software ( windows/IOS/Android/Oxyzen/Linux etc.,)

Remote Servers/Third Party servers


^
|
Browser → Web server → Application Server → Database Server
→ Text ← |→ Soap Language ← | → Query Language ←
Example:
Dogs:

Select * from products where Productname=dogs

Application Layers:

1. Presentation layer
2. Business Logic layer
3. DB Layer

1.Presentation Layer → In this layer UI pages like .js/.css/.html/.png/.jpg etc.,


2.Business Logic layer → In this layer complete application core code. It will
interact with the db layer and retrieve the respective information.
3. DB layer → here we can store data.

1- Tier Architecture
2- Tier Architecture
3- Tier Architecture
N- Tier Architecture

1- Tier Architecture: → Example : most of the Desktop applications ( Skype / MS


Teams / Vugen / Jmeter etc.,).

Only one server → All operations done in one server.

2- Tier Architecture → Mobile applications.

Layer1 → Web layer/server


Layer2 → App Server and DB Server

Clusters : It is nothing but to split the server into multiple partitions.


3- Tier Architecture: → web based applications - Jpet store/ Facebook/ Flipkart/
Amazon

Layer1 → Web server


Layer2 → App server
Layer3 → Db server

N-Tier Architecture: Flipkart / Amazon / Phone Pay / Zomato etc.,

Layer1 → web server


Layer2 → app server
Layer3 → DB server
Layer4 → Remote/Third Party
Web server → Apache Http Server, Nginx, node.js, IIS (Internet Information
Services) etc.,

App server → Apache Tomcat, IBM Web Sphere, Jboss, Web logic etc.,

DB Server → Ms Sql, Oracle, Mongodb, Maria DB etc.,

DB Version: MS sql 2008

On-premise → Servers maintain in a own network


Cloud Premise → serves maintain in a cloud platform network like AWS, Azure etc.,

Class18:

Revision Session :

Class19:

Resume Preparation:

Profile Summary:

Having 5+ years of IT experience in Performance Testing Using Load Runner,


JMeter, Swagger and Postman Tool.
Experience in Web (HTTP/HTML) and REST API Protocol.
Good Experience to write the Performance Test Cases.
Good Experience in Performance Testing Life Cycle.
Good Experience to Create the Performance Test Plan and Workload Design.
Good Experience to create PT Scripts without Recording using Dev Tool.
Having Good Experience in Recording and Enhancing the scripts like Correlation,
Parameterization and Text Check Points using Load Runner and JMeter Tool.
Experience in Load Testing, Stress testing, Endurance Testing and Spike Testing.
Good Experience to generate Customized PT Reports.
Working Experience in Monitoring tools using Perfmon and AppDynamics
Ability to drill down and identify Performance related Bottlenecks.

Naukari:
Class20:

Interview Questions:

1.What is GC ?
2. What are different Stages of Performance Testing ?
3. How do we know which PT Tool will be suitable and types testing will suggest for a
application ?
4. If SLA is not defined by the Client. What is the approach ?
5. Baseline Test usually shows how many users will perform. Single User | 10% | 50% of
User loads.
6. What is your current Project Environment/Architecture ?
7. What is a Performance Centre ?
8. Automated Performance Test ? Jenkins - CI/CD
9. What is the Use of Git ? Git status | Git pull | Git add * | git commit -m” “ | Git push |
Git Status | Git pull
10. Stress Test means ?

Class21:

What is a Performance Centre and Its Advantages ?

It is a web based Application, here we can design the scenario and execute the
scenario like Load/Stress/Endurance Test etc.,

Advantages compared to Controllers ?

1. Since it is a web based application, we can access any where and any machine
to the PC.
2. We can store all PT executions Test Results and Test Scripts here.
3. Easy to maintain Complex environments Projects.

Class22:

Load runner Licence :

1. LoadRunner Professional → Vugen/Controller/Analysis


2. LoadRunner Enterprise → Vugen/Performance Centre/AnalysisLoad
3. LoadRunner Cloud → Vugen/Performance Centre/Analysis/ Load
Generator (all are hosting in the cloud).

Now days, They provide customised packages


The Most common Problems,

1. Few cases, PT Execution Results may not be to Collate due to N of reasons( LG


CPU/Memory/Disk might be 100% usage. We should connect to the LR Support
Team.

Performance Centre/Controller Execution Algorithms:

We assigned LG, it will useful to generate Virtual User Load

Agent Process
Controller —-----------------------> LG

Once you start the test, Controller Files and Scripts will download into Load
Generator. Load Generator will Generate Virtual Users based on Controller
Configuration.In LG, actual execution will happen and also during the test
temporary Results file will be available in Load Generator.Once test completed
based on temporary results file Controller will generate PT Report.

Interview Questions:

1. You started 1 hour Test it went well 30 mins but after 30 mins test got
stopped due to any Reasons. But need 30 mins report and also Results
file is not available in PC/Controller —> we should take the temporary
results file from the Load Generator.
2. You started a 1 hour test and completed 1 hour but we don’t have any
results —> we should take the temporary results file from the Load
Generator.
3. You open the .lrr file Using Analysis component but you didn’t get any
results.what is your approach → we should use “Auto Correlate” option.

Perfmon:

CPU → % Idle CPU Usage | % System CPU Usage | % User CPU Usage
Memory → % Used memory | % AvailableMemory
Disk → Number of bytes read | Number of bytes written
Network → Number of bytes Received | Number of bytes Sent

File Operations:
Working Code:

long fp;
fp = fopen("C:\\Users\\jeeva\\Documents\\OrderDetails.txt","a+");
→ Above 2 lines syntax should be put before the LR Start Transaction

→ Below 2 lines syntax should be put after the LR End Transaction.

fprintf(fp,"%s\n",lr_eval_string("{C_JSESSIONID}"));
fclose (fp);

VLfXwaBGXqG3gadoii48aQb1UNjYsAoNznLYexPw450d8Jkf_mbrdg0_PwfQaYY18mekpABe3XUFXqp6ZrA
ZX0PKNZeT8FH9nH8SqxZCmtI=
VLfXwaBGXqG3gadoii48aQb1UNjYsAoNznLYexPw450d8Jkf_mbrdg0_PwfQaYY18mekpABe3XUFXqp6ZrA
ZX0PKNZeT8FifH9nH8SqxZCmtI=
VLfXwaBGXqG3gadoii48aQb1UNjYsAoNznLYexPw450d8Jkf_mbrdg0_PwfQaYY18mekpABe3XUFXqp6ZrA
ZX0PKNZeT8FH9nH8SqxZCmtI=
VLfXwaBGXqG3gadoii48aQb1UNjYsAoNznLYexPw450d8Jkf_mbrdg0_PwfQaYY18mekpABe3XUFXqp6ZrA
ZX0PKNZeT8FH9nH8SqxZCmtI=

You might also like