LoadRunner IMP
LoadRunner IMP
LoadRunner IMP
** Read Me
This document is created with the intention that it will help students with the topic covered
in the class. Pls feel free to add, if something is missing.
NOTE:
1) Imperatively, don’t delete anything from this doc.
2) Please don't scribble anything on this doc.
3) I have created a section called “interview questions”. Please post-interview questions
and relevant answers (if you kn bbv f to mmow them).
General Section
Downloads
● MicroFocus StormRunner Load
● MicroFocus LoadRunner V12.50 Community version
○ DropBox Link 1 | DropBox Link 2
LoadRunner Certification `
https://inter.viewcentral.com/events/cust/search_results.aspx?
cid=microfocus&pid=1&lid=1&tstamp=1526547153458&event_id=
653&postingForm=catalog.aspx
1. MicroFocus Certification
https://drive.google.com/open?id=1Z4DQp0Dkjf2RCUPfoJnqHmuDt2BpxUXa
Page 1/29
https://www.guru99.com/guide-to-download-and-install-hp-loadrunner-12-0.html#1
Page 2/29
Lectures
Section-01
Deviations in results are called
● Functional Testing - Bugs / Defects
● Performance Testing- Bottlenecks
● Security Testing - Vulnerabilities
Page 3/29
● WebLoad
● Oats
● OctoPerf https://octoperf.com/tutorials/
● Kieker Tools http://kieker-monitoring.net/kieker-tools/
Section-02
(2-10) Server
1. The software needs to understand clients request
2. Process the request
3. Send the response back
Combination of H/W & S/W, s/w by itself is of no use, it needs to be installed on h/w
(2-13) Architecture
Two-Tier Architecture
1. A thin client (websites, accessed through browsers)
Page 4/29
a. Layer 1: PL is on the client
b. Layer 2: BLL + DML is on the server
2. Thick / Fat Client (Ex: mobile apps,)
a. Layer 1: PL + BLL is on the client
b. Layer 2: DML is on the server
Layers
1. Layer 1: PL on client
2. Layer 2: PL build on Webserver
3. Layer 3: BLL on APP server
4. Layer 4: DML on DB server
Transaction Response Time represents the time taken for the application to complete a
defined transaction or business process
Scalability
● Size scalability is the maximum number of processors that a system can
accommodate. To scale vertically (or scale up/down) means to add resources to (or
remove resources from) a single node in a system, typically involving the addition of
CPUs or memory to a single computer.
● Scale up (vertical scaling) / Scale out (horizontal scaling)
● :) What does “scale out” vs. “scale up” mean?
Page 5/29
(2-16) Know Your Servers
(2-17) Protocols
4. Set of rules
5. Server has to understand the request (from client), at the same time the client needs
to follow protocol(s)
6. EX: LR Protocols
○ HTTP / HTTPS / FTP
○ SMTP (email) / SNMP / TCP
○ https://performanceengineeringsite.wordpress.com/2016/12/20/loadrunner-
protocols-list/
7. HTTP Protocol
○ Rules
■ Every request has a header & Body
■ Header has key value pairs
■ Header is mandatory & body optional
■ HTML is used in body .. etc
○ Web Server is full implementation of HTTP Protocol
○ Web Browser is Partial implementation of HTTP Protocol
Section-03
(3-18) LR Installation
LR 12.50
8. There's a significant difference in features of LR 12.50 vs 12.53
9. LR 12.50 is a community edition, free for life with 50 Vusers
10. MicroFocus LoadRunner V12.50 Community version
○ DropBox Link 1 | DropBox Link 2
Page 6/29
○ Controller
○ Analysis
Section-04
Page 7/29
Production Like Environment
(4-21) Abbreviations
15. PT: Performance testing
16. NFT: Non-Functional testing.
17. AUT: Application Under Test
18. SUT: System under test
19. PTLC: Performance Testing Life Cycle
20. WLM: Work Load Modeling
21. Response Time - Time is taken by the system to respond to a specific transaction
request
22. Think Time –Time is taken for selecting a new transaction after receiving the response
for the previous transaction.
23. Throughput - Transactions per second, Bytes per second
24. 90 percentile response time
○ When we execute a Performance Test, the same transaction will be executed
multiple times.
○ Since the same transaction is executed multiple times, multiple response times
are captured
25.
Page 8/29
Section-05
Infrastructure Details
32. As part of NFR gathering, PT team is supposed to capture the configuration details of
both Production Environment and Performance testing environment
33. Data collected
○ Operating System of each server– OS version in
■ Solaris 9, AIX, RedHat linux
○ Hardware configurational of each server –
■ Number of CPU’s, speed, memory etc..
■ 1.6 GHz processors with 32MB Cache, 16GB memory, 100GB Hard Disks
○ Details of Server Clusters.
○ Support Software on each server – Web / App server, Database
■ WebLogic 8.1 Premium Server, Oracle 10G Enterprise
34. Example
○ Apache Tomcat Server 8
○ 1.6GHz processors with 32MB Cache, 16GB Memory, 100GB Hard Disks, HP-UX
and Java ES pre-installed
NFR Types
● Performance Critical Transactions
● Business Critical
● High Resource Intensive Requirement
Transaction Details
● As part of NFR gathering, PT team is supposed to capture a list of performance critical
transactions.
● What are Performance Critical Transactions:
○ Transactions which are executed Frequently.
○ Transactions which are critical for Business.
○ Transactions that are suspected to have high resource requirements.
● Example: For a banking application, following transactions are critical
○ Account Summary Details
○ Checking Transaction History
○ Balance Transfer
○ Login
Page 9/29
○ Logout
● Following transactions are not critical
○ Change Password
○ Change Username
○ Change Theme
○ Order Checkbook
● Business Critical TXNS: txns that are not performance critical but are revenue
generating for client (so make sure they are included in tests) was
○ Open New Savings A/C
○ Open FD (Fixed Deposit) / CD (Certificate Deposit)
○ The above txns may not happen daily, but bring revenue everytime a new A/C
is created
● Banking TXNs Suspected to have High Resource Intensive Requirement (& are
Business Critical)
○ Transaction History of last 5 years
Page 10/29
○
●
○ M
Page 11/29
● After the Performance test execution, the test results are compared with the SLA to
determine if the application meets performance expectations
● Examples:
○ When application is subjected to 1000 concurrent user load, “Login”
transaction should not take more then 2 seconds to complete
○ When an application is subjected to 1000 concurrent user load, CPU utilization
of the WebApp Server should never cross 60%. (70% industry standard)
Section-06
Example 1
35. Assuming the Client provides the following “WorkLoad Related Data”
36.
37.
Page 12/29
38.
39.
40. Usually Approach #2 is followed (using less Vusers) in both the cases (above & below)
Page 13/29
41.
42. Think Time Vs Pacing: Pacing in load testing refers to the time between the iterations
of your test scenarios. This is unlike Think Time, which refers to the delay between
each component of the Transaction. Pacing allows the load test to better simulate the
time gap between two iteration
● Example 2
43.
44.
Page 14/29
45.
46.
Page 15/29
49.
(or)
N = Number of users
R = average response time (now you know, it can be pacing too)
Z = Think Time
X = Throughput (i.e. TPS)
* R+Z = Script execution time (SET)
Page 16/29
X = TPS = (TPH/3600)
I.e Transactions per Sec = (Transactions per Hour / 3600)
Example 1
If N = 100, R = 2 sec,
100= (2+Z)*X and hence –> If Z=18, X = 5
Example 2
6 login transaction per hour (6 TPH), 2 concurrent users, Script Execution Time is 10 mins,
calculate pacing?
6 TPH, N=2, SET = 10m= 600 sec
X = TPS = TPH/3600 = 6/3600 =1/600
* Example 3
First 3 columns data (BP, N, TPH) are provided by the SME / Business team, the rest need to
be calculated
Page 17/29
● SET, is not provided by SME, its calculated
Workload Modeling:
Workload model is simply a set of business transactions performed by given concurrent users
for a given time to analyze the behavior of the system under test.
Section-07
(7-31/34) : LR Components
1. VuGen / Virtual User Generator
a. You can use Fiddler / web custom request if you can't record on VuGen
2. Controller
3. Analyser
4. Load generator (LG) / Load injector / Agent machine
Use
Page 18/29
(7-35) : LR Architecture
● ADVANCED Reading:
○ Memory Management in LoadRunner
○ How Can I Calculate the Number of Load Generators Required for TruClient
Scripts
●
Page 19/29
Memory FootPrint
● Will vary from protocol to protocol & tool to tool
○ HTTP / HTML protocol in LR is 2.3mb RAM for each user
○ EX: For a server / PC with 500mb RAM you can run = 500/2.3= 217 Vusers (max)
○ You don’t push to the max, give some slack & run 180-200 Vusers
○ Memory FootPrint SpreadSheet
● FootPrint by Protocol
○ Web protocol: 2MB memory / user
○ CITRIX protocol: 10 MB memory / user
○ AJAX protocol: 25 - 30 MB memory / user
○ SAP GUI protocol: 10 MB memory / user
○ Any other GUI protocol: 10 MB memory / user
● More on AJAX / TruClient FootPrint
● Wilson Mar- AJAX RIA web app load testing using LoadRunner
(7-3) : LR nu
A
For transactions:
lr_start_transaction(“Transaction_name”);
lr_end_transaction(“Transaction_name”,LR_AUTO);
Page 20/29
web_reg_find(“text=webtours”,LAST); Before a request
Image Checkpoint:
web_image_check(“”,LAST); After a request
Rendezous pt:
To make all Vusers would run simultaneously a particular transaction, should be added before
request
Useful while doing real execution.
lr_rendezous(“transaction_name”);
Section-9
Section-10
Parameterization
lr_exit : exits if
the function / condition fails & executes vuser_end marking the transaction / test as FAIL
Page 21/29
(10-85) Parameterization - Part-3
Page 22/29
Lr_output_message
Section-11
Page 23/29
4. char - a single character.
5. void - valueless special purpose type which we will examine closely in later sections.
Correlation
Page 24/29
Section-12
SAP Protocol
http://ishatrainingsolutions.org/sap-gui-loadrunner-recorded-videos/
● SAP Architecture – Brief Overview
● SAP GUI – Understanding SAP MM Business flows
● Enable SAP GUI recording on SAP servers
● VUGEN
○ Record / PlayBack
○ Add Transactions
○ What are Objects and Control ID’s?
○ Define control ID in the lr_strings.h
○ Directly use Control ID in the script
○ Insert Steps Interactively into a SAP GUI Script
○ Replace Masked Password
○ Conversions
■ Integer
■ String
■ LR Parameter
■ Convert from LR parameter to string and vice Versa
○ Retrieve Information
○ Error handling
○ Add Verification Points
○ Dealing with Optional Windows
○ Using Control ID’s with LR Parameters
○ Parameterization
○ File operations
Page 25/29
Advanced Topics / Further Reading
Books
● “Surviving the Top Ten Challenges of Software Testing” written by William E. Perry
and Randall W. Rice.
● Manual Testing Help – Version 1
● Manual Testing Help (Practical Software Testing) – Version 2
● Freelance Software Testing Job Opportunities
● https://www.softwaretestinghelp.com/software-testing-books/
VTS Definition
● https://www.youtube.com/watch?v=BhN0Pp4I98M
● VTS is a tool (built into LoadRunner) that shares data & parameters between
LoadRunner Vusers (during runtime in the controller).
● Unlike standard parameterization VTS uses a centralized repository to store data,
therefore data can be passed between vusers during the load testing
● VTS is always up & running as a service & doesn't require a user to be logged on system
● having Access from script 'disabled' will not allow Access to any script
● Enable Access from the script, then change API Access port #
Page 26/29
Noise Testing
● http://www.starbase.co.uk/blog/hp-loadrunner-12-02-second-look-at-noise-
testing1.html
● Many applications where 85% of users just hit the homepage and don’t do anything
useful i.e. they are just background noise.
● The good thing is that recreating this noise will effectively be ‘free’, i.e. no virtual
user license will be consumed – thus allowing the full license to be used for the actual
business processes you want to test.
● The noise test performs basic load testing without an actual business process., You
tell LoadRunner the static URL you want to hit to generate ‘noise’ and LoadRunner will
create a Vuser that hits it throughout your scenario.
● Setting up Noise Testing
○ Add a new group in LoadRunner and select the ‘Use a Noise Generator…’
option, then specify the URL and the number of vusers.
○ When you run the performance test scenario each noise generator vuser will hit
the URL as frequently as it can. If you want to change the pace of how often
the URL is hit you can do this via the pacing options in the runtime settings.
Page 27/29
Best Practices: Load / Performance Testing
● Do's and Don'ts of Load Testing
● 6 Steps to Become a .Net Performance Expert
● Accelerating Your Delivery Pipeline with SmartBear and Jenkins
●
Page 28/29
Interview Section
How do you determine which piece of software requires how much testing?
We can know this factor by finding out the Cyclomatic Complexity.
● Is the feature/program testable?
● Is the feature/ program understood by everyone?
● Is the feature/program reliable enough?
Performance tuning
What is performance tuning? How many types are there?
Performance tuning is done for improving the system performance:
1. Hardware Tuning: Optimizing, adding or replacing hardware components of the
system and changes done in the infrastructure level to improve system performance is
called hardware tuning.
2. Software Tuning: Identifying the software level bottlenecks by profiling the code,
database etc. Fine tuning or modifying the software to fix the bottlenecks is called
software tuning.
Phases of STLC
● Requirements phase
● Planning Phase
● Analysis phase
● Design Phase
● Implementation Phase
● Execution Phase
● Conclusion Phase
● Closure Phase
Page 29/29