Monday, December 26, 2016

LoadRunner FAQ

My FAQ's
---------
* FAQ's

Self Learning - 1/23/2017
Introduction to Performance Testing Part 1
https://www.youtube.com/watch?v=HR-IGAZ0CWk

1. What is Performance Testing?
2. Need to Performance Test application
3. Why Performance Testing?

Testing - 1. Functional - Testcase of login verifyt the home page and logout, we are testing the functionality (Happy path)

2. Non-Functional - Perffomance
    i. Client Side  - we will get two metrics - i Respose time & ii Throughtput
   ii. Server Side  - we will get two metrics - i CPU & ii memory primary / second , Network i& ii IO

* What is Performance Testing? PT is an non-functional testing performed to determine how a system
performs in terms of responsivensss and stability under a particular workload. It can also serve to
investigate, measure, validate or verify other quality attributes of the system. sucha as Scalability, reliability
and resource usage

GOAL/Objective is to find the bottle neck in the system.

* Need to PT appliction 1. Speed - Does the application respond quickly enough for the intended users? ( 3 sec per second)
  2. Scalability - will the application handle the expected user load and beyond?  Users access from 10000 to 100,000
  3. Stability - Is the application stable under expected and unexpected user loads? Stress testing \ Spike testing  ( chrismas time many user acces it)
  4. Confidence - Are you sure the users will have a positive experience on go-live day?

* Performance Testing Life Cycle and Terminology
https://www.youtube.com/watch?v=1nc5sq3hNjE

SDLC
----
Requirement SRS, CRS - Customer
Planing
Design & Analysis
Implementation
Testing
Deployment \ Maintainance

STLC
-----
Requirement FRS , NFRS
Planing
Design _ sstrategy
  M - TC Desing
   A - TScript Design and dvelopement
Execution
Summary of the execction no tcs pass, no tcs fail and no of defect
Test closer
Testing
Deployment \ Maintainance

PTLC
-----
1)Requirement NFRS what we will as
            1. Response time
            2. No of Transactions ( different type of trfs)
            3. application availability
            4. different type of traverses ( Navigation)

Application information document ( AID)
Non functional requirement document (NFRD) - SLA
Based on AID and NFRD we will prepare the DOU - Document of understanding ( What, where and how we are going to do the test) during the planing
2) Plan, Design and Analysis.
 While test plan need to do POC to gain the confident of the customer.
 Plan - about the project, in scope, out scope, scheduel, time, deliverable

https://www.youtube.com/watch?v=zTf27d1IgQ4
Different Typest of Performance Testing
Online Users - Users who are logged in
Concurrent users - Users who do something with server at the same time
1* Load testing
 expected number of users to be handled
 daily basis - x number of users
 daily phenomenon
 throu-out the day
 if you give 500 invites for a family fuction
 make sure space coffee tea dinner is available for all
 Theoritically millions of people can come
 Its base on you marketing - the trafic will come

2*. Stress\ Step Testing
  Execute the loAD - 1. Incremental load, 2 Break even point of the system., 3 future growth.
  - Overload - ( exepected to work for 8 hours)
    work for 12 hrs is stress
    For 6 days is stress
    Happens for a shorter duration
    We gave invite for 500 for a day; in first hour 1000 people came; all food, tea coffee will be quickly drained.
    Flash flood - will cause damage
    publication of results
    y % over normal load

3 * Capacity or Scalability test
    system may breakdown
    yielding point - elastic limit
    will accomedate some user - at somepoint it will crash occupies memory and cpu

4 * Volume Testing
    huge data
    railways reservation
    800k tickeys per day
    Credit cards - worldwilde
    email daily in gmail

5* Endurance test
   or availabilyt test
   run for a longer duration
  * memory leaks

Spike - Sudden rise and fall, share market , thanks giving day purchase
----
*1. C Program to Write a Sentence to a File
#include <stdio.h>
#include <stdlib.h>  /* For exit() function */
int main()
{
   char sentence[1000];
   FILE *fptr;

   fptr = fopen("program.txt", "w");
   if(fptr == NULL)
   {
      printf("Error!");
      exit(1);
   }
   
   printf("Enter a sentence:\n");
   gets(sentence);

   fprintf(fptr,"%s", sentence);
   fclose(fptr);

   return 0;
}
Output
Enter sentence: 
I am awesome and so are files.

*2. Example: Program to read text from a file

#include <stdio.h>
#include <stdlib.h> // For exit() function
int main()
{
    char c[1000];
    FILE *fptr;

    if ((fptr = fopen("program.txt", "r")) == NULL)
    {
        printf("Error! opening file");
        // Program exits if file pointer returns NULL.
        exit(1);         
    }

    // reads text until newline  - // slash leans backwards ( \ ), while a forward slash leans forward ( / ).
    fscanf(fptr,"%[^\n]", c);

    printf("Data from the file:\n%s", c);
    fclose(fptr);
    
    return 0;
}
If the file program.txt is not found, this program prints error message.
If the file is found, the program saves the content of the file to a string c until '\n' newline is encountered.

Suppose, the program.txt file contains following text.
C programming is awesome.
I love C programming.
How are you doing?

The output of the program will be:
Data from the file: C programming is awesome.


*3. C Program to Display its own Source Code as Output
//C Preprocessor and Macros
#include <stdio.h>
int main(){
   printf("%s",__FILE__);
}

---------------
//C Programming Files I/O
#include <stdio.h>
int main() {
    FILE *fp;
    char c;
    fp = fopen(__FILE__,"r");
    do {
         c = getc(fp);
         putchar(c);
    }
    while(c != EOF);
    fclose(fp);
    return 0;
}

* 4. Example: Concatenate Two Strings Without Using strcat()
#include <stdio.h>
int main()
{
    char s1[100], s2[100], i, j;

    printf("Enter first string: ");
    scanf("%s", s1);

    printf("Enter second string: ");
    scanf("%s", s2);

    // calculate the length of string s1
    // and store it in i
    for(i = 0; s1[i] != '\0'; ++i);

    for(j = 0; s2[j] != '\0'; ++j, ++i)
    {
        s1[i] = s2[j];
    }

    s1[i] = '\0';
    printf("After concatenation: %s", s1);

    return 0;
}
Output
Enter first string: lol
Enter second string: :)
After concatenation: lol:)

* Example: C Arrays
// Program to find the average of n (n < 10) numbers using arrays

#include <stdio.h>
int main()
{
     int marks[10], i, n, sum = 0, average;
     printf("Enter n: ");
     scanf("%d", &n);
     for(i=0; i<n; ++i)
     {
          printf("Enter number%d: ",i+1);
          scanf("%d", &marks[i]);
          sum += marks[i];
     }
     average = sum/n;

     printf("Average marks = %d", average);

     return 0;
}
Output
Enter n: 5
Enter number1: 45
Enter number2: 35
Enter number3: 38
Enter number4: 31
Enter number5: 49
Average = 39

* C Programming Multidimensional Arrays

* Initialization of a two dimensional array
// Different ways to initialize two dimensional array

int c[2][3] = {{1, 3, 0}, {-1, 5, 9}};
         
int c[][3] = {{1, 3, 0}, {-1, 5, 9}};
                
int c[2][3] = {1, 3, 0, -1, 5, 9};

* Initialization of a three dimensional array.
int test[2][3][4] = { 
                     { {3, 4, 2, 3}, {0, -3, 9, 11}, {23, 12, 23, 2} },
                     { {13, 4, 56, 3}, {5, 9, 3, 5}, {3, 1, 4, 9} }
                 };

* Example #1: Two Dimensional Array to store and display values
// C program to store temperature of two cities for a week and display it.
#include <stdio.h>

const int CITY = 2;
const int WEEK = 7;

int main()
{
    int temperature[CITY][WEEK];
    for (int i = 0; i < CITY; ++i) {
        for(int j = 0; j < WEEK; ++j) {
            printf("City %d, Day %d: ", i+1, j+1);
            scanf("%d", &temperature[i][j]);
        }
    }

    printf("\nDisplaying values: \n\n");
    for (int i = 0; i < CITY; ++i) {
        for(int j = 0; j < WEEK; ++j)
        {
            printf("City %d, Day %d = %d\n", i+1, j+1, temperature[i][j]);
        }
    }
    return 0;
}
Output

City 1, Day 1: 33
City 1, Day 2: 34
City 1, Day 3: 35
City 1, Day 4: 33
City 1, Day 5: 32
City 1, Day 6: 31
City 1, Day 7: 30
City 2, Day 1: 23
City 2, Day 2: 22
City 2, Day 3: 21
City 2, Day 4: 24
City 2, Day 5: 22
City 2, Day 6: 25
City 2, Day 7: 26

Displaying values: 

City 1, Day 1 = 33
City 1, Day 2 = 34
City 1, Day 3 = 35
City 1, Day 4 = 33
City 1, Day 5 = 32
City 1, Day 6 = 31
City 1, Day 7 = 30
City 2, Day 1 = 23
City 2, Day 2 = 22
City 2, Day 3 = 21
City 2, Day 4 = 24
City 2, Day 5 = 22
City 2, Day 6 = 25
City 2, Day 7 = 26
Example #2: Sum of two matrices using Two dimensional arrays
C program to find the sum of two matrices of order 2*2 using multidimensional arrays.

#include <stdio.h>
int main()
{
   float a[2][2], b[2][2], c[2][2];
   int i, j;

   // Taking input using nested for loop
   printf("Enter elements of 1st matrix\n");
   for(i=0; i<2; ++i)
    for(j=0; j<2; ++j)
    {
       printf("Enter a%d%d: ", i+1, j+1);
       scanf("%f", &a[i][j]);
    }

  // Taking input using nested for loop
   printf("Enter elements of 2nd matrix\n");
   for(i=0; i<2; ++i)
    for(j=0; j<2; ++j)
    {
       printf("Enter b%d%d: ", i+1, j+1);
       scanf("%f", &b[i][j]);
    }

   // adding corresponding elements of two arrays
   for(i=0; i<2; ++i)
    for(j=0; j<2; ++j)
    {
       c[i][j] = a[i][j] + b[i][j]; 
    }

   // Displaying the sum
   printf("\nSum Of Matrix:");

   for(i=0; i<2; ++i)
    for(j=0; j<2; ++j)
    {
       printf("%.1f\t", c[i][j]);  
       
       if(j==1)            
          printf("\n");
    }
return 0;
}
Ouput

Enter elements of 1st matrix
Enter a11: 2;
Enter a12: 0.5;
Enter a21: -1.1;
Enter a22: 2;
Enter elements of 2nd matrix
Enter b11: 0.2;
Enter b12: 0;
Enter b21: 0.23;
Enter b22: 23;

Sum Of Matrix:
2.2     0.5
-0.9    25.0

-----
FAQ
1. * http://www.softwaretestinghelp.com/loadrunner-interview-questions-and-best-answers/

* http://www.softwarehour.com/loadrunner/loadrunner-protocols/
Loadrunner supports the following protocols. This protocol list has been taken from Loadrunner 12.02
 Also for details refer below: *
.NET It supports the recording of Microsoft .Net Applications.
Ajax (Click & Script) Ajax stands for Asynchronous JavaScript and XML. This protocol uses asynchronous HTTP request, for example the graphs which you are monitoring will change automatically, instead of changing whole web page
C Vuser It is a general virtual user which uses the standard C library.
Citrix ICA, COM/DCOM,
Domain Name Resolution (DNS) - This protocol is used to test the DNS servers. It is used to resolve hostnames to ipadresses. You do not have any option for recording, need to manually enter different functions in VuGen.
Flex Flex is a software development kit to develop rich internet application. Action Message Format (AMF) protocol is used to exchange flash data between a flash application and an application server over HTTP.
FTP(File Transfer Protocol ) FTP is used to transfer files from one computer to another computer over a network. This protocol emulates the actions that are performed over FTP server.
IMAP (Internet Messaging) Internet Message Application – A protocol which is used by client machines to read email from mail server.
Java over HTTP Designed to record java-based applications and applets. It produces a Java language script using web functions. This protocol is distinguished from other Java protocols in that it can record and replay Java remote calls over HTTP.
Java Record Replay It is a general Java recorder, to record and replay java applications.
Java Vuser Java programming language with protocol level support.
LDAP(Listing Directory Service) This protocol is used to email applications that look for contact information from the servers.
MAPI(Microsoft Exchange) MAPI stands for Messaging Application Programming Interface. It is a microsoft product which is developed to send and receives email messages.
MMS(Media Player) This protocol is used to record MMS media player that access data from media server using MMS protocol.
MMS (Multimedia Messaging Service) MMS stands for Multimedia messaging service which is used to send images and videos over a mobile network between mobiles.
Mobile Application – HTTP/HTML Enables the recording of mobile native applications.
ODBC ODBC stands for Open Database Connectivity – ODBC is middleware API for accessing databases.
Oracle – 2 Tier This protocol is used to record oracle database application that are using standard 2-tier client/server architecture.
Oracle – Web This protocol is used to record application that are performed through web applications. This protocol detects the actions that are perfomred on Loadrunner API and Javascript levels.
Oracle NCA This protocol is used to record 3-tier applications consisting of java client, web server and database.
POP3(Post Office Protocol) This protocol is used record application that retrieve email messages using POP3 from mail server.
RDP(Remote Desktop Protocol) This protocol is used to record applications which are running on remote machines such and connected through Microsoft Remote Desktop
RTE (Remote Terminal Emulator) This protocol is used to record applications that use terminals to give input and receive opput from the server.
SAP (Click & Script) This protocol is used record an applicaton that communicate between a browser and a SAP server.
SAP GUI This protocol is used to record application that are integrated key business using windows SAP GUI client.
SAP – Web This protocol is used to record applications that are using SAP web clients over HTTP to access SAP servers.
Siebel – Web This protocol is used to record applications that are developed using Oracle Siebel Customer Relationship Management.
Silverlight This protocol is used to record application that are developed using Microsoft Silverlight.
SMP (SAP Mobile Platform) This protocol is used to record applications that are developed for SAP Mobile Platform.
SMTP(Simple Mail Protocol) This protocol is used to record applications that are using SMTP protocol to access mail server
TruClient – Firefox / IE This protocol is used to record application that are developed using modern javascript that are used to perform user actions in the browser itself.
TruClient – Mobile Web This protocol is used to record application that are developed for modern javascript mobile browsers.
Web (HTTP/HTML) This protocol is used to communicate from a web browser to web server.
Web Services This protocol is used to record web services applications which is use to communicate between two applications over HTTP.
Windows Sockets The is a standard protocol to record network programming interface for the Windows platform.


Load Runner: In Resume
------------
Automated test cases for Performance Validation
Initiate and lead creation of scalable Jmeter based performance test suite
Workflow performance validation for Front End components
API performance validation for Back End
Performance testing of web applications using JMeter
Created JMeter scripts and ran performance testing against hosted (cloud) and on-prem (physical) solutions.

Record, recreate and execute scripts for various test applications with Loadrunner 12.0 on web (HTTP/HTTPS).
Conduct various performance tests (load test, stress test, capacity test), analyze test results and present findings to development teams.
Experience in fault finding and diagnostic of bottleneck to troubleshoot issues in load and performance test environment
Analyze performance issues with applications and provide a detailed report about findings during execution
Protocol use for script creation: HTTP/HTTPS, AJAX and Web services including WCF and web.




2.a
Once the code has been promoted into staging, the regression suite is initiated, also JMeter performance tests are
triggered and statistics are collected and analyzed via Jenkins Performance Plugin together with some bash script magic

3. FAQ's
http://www.softwaretestinghelp.com/loadrunner-interview-questions-and-best-answers/

Parametrization - Static data VS coorelation  - Dynamic data ( Server generated script we capturing and passing in the script).

Q # What is the Rendezvous point?
Ans => Rendezvous point helps in emulating heavy user load (request) on the server. This instructs Vusers to act simultaneously. When the vuser
reaches the Rendezvous point, it waits for all Vusers with Rendezvous point. Once designated numbers of Vusers reaches it, the Vusers are released.
Function lr_rendezvous is used to create the Rendezvous point. This can be inserted by:

Rendering time - framework (Server resposned time and framework loading)
Throught - Server resposned time

SLA - Service level aggrement -  based on the appl. or the vendor will provied.
Every page should response 5 sec, 90% of response in 5%; remaining 10% pages in 10 Sec.

Reponse Time - Mimimum ( bottom range), Average, maximum ( Top range) and 90%.
Vugen report - Hp Perfomance center = (ALM) - LR ( We can see all the report).

We can create for manual \ Fun \ LR. ALM will intergrated with LR.
We select the scenario its we should.

Perfomance testing framework - HP Perfomance testing framework.
Test data Parameter : We will create external data sheet ( We will give path) \ Inside the script it self we store data (Mrkt standard)

Risk :
Scripting - coorelation and proxy testing
Monitoring - 1. Heap size analysis ( Memory of server); memory leak; latancey & data connection.( With the server ) - Since the connection pool is full; since we
we exide more than that it fails.

Challanges :
All the risk are my c i will try to resolve it.
What is the problem and work with dev lead or real time web server Team people.

TPS - Transaction per secs
SPS -
Rendezvous button on the floating Recording toolbar while recording.
After recording Rendezvous point is inserted through Insert> Rendezvous.

Q # What are the number of graphs you can monitor using Controller at a time? What is the max of them?
Ans => One, two, four and eight graphs can be seen at a time. The maximum number of graphs can be monitored in at a time is 8.


http://www.guru99.com/how-to-use-analyzer-in-loadrunner-12-0.html
Graphical Reports:
------------------
3.1 Average Response Time graph:
3.2 Hits Per Second graph:
3.3 Running VUsers graph:
3.4 Throughput graph
3.5 VUser Summary:
This graph displays the number of VUsers that completed their run successfully, stopped their run, or ended with errors. This is how it looks like:

How to use Analyzer in LoadRunner

3.6 Rendezvous graph:
This graph Indicates when VUsers were released at rendezvous points and how many VUsers were released at each point. This is how it looks like:

How to use Analyzer in LoadRunner

3.7 Transactions Per Second graph:
This graph displays the number of completed transactions (both successful and unsuccessful) performed during each second of a load test. This graph helps you determine the actual transaction load on your system at any given moment. This is how it looks like:

How to use Analyzer in LoadRunner

3.8 Total Transactions Per Second graph:
This graph displays the total number of completed transactions (both successful and unsuccessful) performed during each second of a load test. This graph helps you determine the actual transaction load on your system at any given moment. This is how it looks like:

How to use Analyzer in LoadRunner

3.9 Transaction Summary graph:
This graph displays the number of transactions that passed, failed, stopped, or ended with errors. This is how it looks like:

How to use Analyzer in LoadRunner

3.10 Transaction Performance Summary graph:
This graph displays the minimum, average, and maximum response time for all the transactions in the load test. This is how it looks like:

How to use Analyzer in LoadRunner

3.11 Transaction Response Time Under Load graph:
Displays average transaction response times relative to the number of VUsers running at any given point during the load test. This graph helps you view the general impact of VUser load on performance time and is most useful when analyzing a load test which is run with a gradual load. This is how it looks like:

How to use Analyzer in LoadRunner

3.12 Transaction Response Time Percentile graph:
This graph displays the percentage of transactions that were performed within a given time range. This graph helps you determine the percentage of transactions that meet the performance criteria defined for your system. This is how it looks like:

How to use Analyzer in LoadRunner


3.13 Transaction Response Time Distribution graph:
This graph displays the number of times a transaction was completed over a distribution of time ranges. Note that this graph only displays information for a single transaction at a time. This is how it looks like:

How to use Analyzer in LoadRunner

3.14 Throughput (MB) graph:
This graph displays the amount of throughput (in megabytes) on the Web server during the load test. Throughput represents the amount of data that the VUsers received from the server at any given second. This graph helps you to evaluate the amount of load VUsers generate, in terms of server throughput. This is how it looks like:

How to use Analyzer in LoadRunner

3.15 HTTP Status Code Summary:
This graph displays the distribution of the various HTTP protocol status codes returned from the Web Server during the load test. This is how it looks like:

4 How to use Analyzer in LoadRunner

3.16 HTTP Response Per Second graph:
This graph displays the number of the different HTTP status codes returned from the Web server during each second of the load test. This is how it looks like:

How to use Analyzer in LoadRunner

3.17 Pages Download Per Second graph:
This graph displays the number of pages received from the Web server during the load test. This is how it looks like:

How to use Analyzer in LoadRunner

3.18 Connections graph:
This graph displays the number of Connections. This is how it looks like:

How to use Analyzer in LoadRunner

3.19 Connections Per Second graphs:
This graph displays the number of Connections per Second. This is how it looks like:

How to use Analyzer in LoadRunner

3.20 Page Component Breakdown (Over Time) graph:
This graph displays the average response time (in seconds) for each Web page and its components during each second of the scenario run. This is how it looks like:

How to use Analyzer in LoadRunner

3.21 Page Download Time Breakdown (Over Time) graph:
This graph displays a breakdown of each page component's download time during each second of the scenario run. This is how it looks like:

How to use Analyzer in LoadRunner

3.22 Time to First Buffer graph:


This graph displays the number of hits made on the Web server by VUsers during each second of the load test. This graph helps you evaluate the amount of load VUsers generate, in terms of the number of hits.

3.2 Hits Per Second graph:
3.3 Running VUsers graph:
3.4 Throughput graph
3.5 VUser Summary:
3.6 Rendezvous graph:
3.7 Transactions Per Second graph:
3.8 Total Transactions Per Second graph:
3.9 Transaction Summary graph:
3.10 Transaction Performance Summary graph:
3.11 Transaction Response Time Under Load graph:
3.12 Transaction Response Time Percentile graph:
3.13 Transaction Response Time Distribution graph:
3.14 Throughput (MB) graph:
3.15 HTTP Status Code Summary:
3.16 HTTP Response Per Second graph:
3.17 Pages Download Per Second graph:
3.18 Connections graph
3.19 Connections Per Second graphs:
3.20 Page Component Breakdown (Over Time) graph:
3.21 Page Download Time Breakdown (Over Time) graph:
3.22 Time to First Buffer graph:


* What is throughPut?

https://www.joecolantonio.com/2011/07/05/performance-testing-what-is-throughput/

Basically, “Throughput” is the amount of transactions produced over time during a test. It’s also expressed as the amount of
capacity that a website or application can handle. Also before starting a performance test it is common to have a throughput
goal that the application needs to be able to handle a specific number of request per hr.

Let’s Imagine Throughput in the real world
For example: Let’s imagine that a gas station attendant fills up a car’s gas tank using a gas pump. Let’s also say that it always takes the gas attendant
just one minute to fill up any car, no matter how big it is or how low the car’s gas tank is.

Let’s call this gas station “Joe’s Gas,” and envision that it only has three gas pumps. Naturally, if we have three gas pumps and three cars, it follows
that Joe’s attendants can only fill up three cars per minute. So, if we were to fill out a performance report for Joe’s gas station, it would show
that Joe’s throughput is three cars per minute.

Throughput no wait

This is Joe’s dilemma: no matter how many cars need gas, the maximum number that can be handled during a specific time frame will always be the same –three.
This is our maximum throughput; it is a fixed upper bound constraint.


Throughput
As more vehicles enter the gas pump line they are required to wait, thus creating a queue.

It is the same concept that applies if we are testing a web application. If a web app receives 50 requests per second, but can only
handle 30 transactions per second, the other 20 requests end up waiting in a queue. When presenting performance test results, throughput
performance is often expressed as transactions per second, or TPS.

* What is Vsuer Vs Cpu user?
Virsual suer vs cpu user

* Load Runner Key Takeaways
a. Tutorials have been recorded using Loadrunner version 8.1 but you can use the tutorials to learn any newer versions.
b. Loadrunner primarily is a 3 stage architecture consisting of the
i.   Vuser Host,
ii.  Controller and the Analysis and
iii. Monitoring tool.

c. A Typical performance testing process would consist of
a) Planning your Load Test
b) Creating Vuser Scripts
c) Creating Load Scenarios
d) Run the Load Tests
e) Analyze Results
f) Fine tune your system

Refer to : http://www.guru99.com/loadrunner-tutorial-1.html

*
* http://www.softwarehour.com/loadrunner/loadrunner-protocols/
Loadrunner supports the following protocols. This protocol list has been taken from Loadrunner 12.02
Also for details refer below: *

List of Protocols in Loadrunner
Loadrunner supports the following protocols. This protocol list has been taken from Loadrunner 12.02

PROTOCOLS DESCRIPTION
.NET It supports the recording of Microsoft .Net Applications.
Ajax (Click & Script) Ajax stands for Asynchronous JavaScript and XML. This protocol uses asynchronous HTTP request, for example the graphs which you are monitoring will change automatically, instead of changing whole web page
C Vuser It is a general virtual user which uses the standard C library.
Citrix ICA Citrix ICA is used to run certain application from remote machines. This protocol is used to record such type of applications.
COM/DCOM Component Object Model (COM)/Distributed Component Object Model (DCOM)- This software is used by developers to create the reusable software.
Domain Name Resolution (DNS) This protocol is used to test the DNS servers. It is used to resolve hostnames to ipadresses. You do not have any option for recording, need to manually enter different functions in VuGen.
Flex Flex is a software development kit to develop rich internet application. Action Message Format (AMF) protocol is used to exchange flash data between a flash application and an application server over HTTP.
FTP(File Transfer Protocol ) FTP is used to transfer files from one computer to another computer over a network. This protocol emulates the actions that are performed over FTP server.
IMAP (Internet Messaging) Internet Message Application – A protocol which is used by client machines to read email from mail server.
Java over HTTP Designed to record java-based applications and applets. It produces a Java language script using web functions. This protocol is distinguished from other Java protocols in that it can record and replay Java remote calls over HTTP.
Java Record Replay It is a general Java recorder, to record and replay java applications.
Java Vuser Java programming language with protocol level support.
LDAP(Listing Directory Service) This protocol is used to email applications that look for contact information from the servers.
MAPI(Microsoft Exchange) MAPI stands for Messaging Application Programming Interface. It is a microsoft product which is developed to send and receives email messages.
MMS(Media Player) This protocol is used to record MMS media player that access data from media server using MMS protocol.
MMS (Multimedia Messaging Service) MMS stands for Multimedia messaging service which is used to send images and videos over a mobile network between mobiles.
Mobile Application – HTTP/HTML Enables the recording of mobile native applications.
ODBC ODBC stands for Open Database Connectivity – ODBC is middleware API for accessing databases.
Oracle – 2 Tier This protocol is used to record oracle database application that are using standard 2-tier client/server architecture.
Oracle – Web This protocol is used to record application that are performed through web applications. This protocol detects the actions that are perfomred on Loadrunner API and Javascript levels.
Oracle NCA This protocol is used to record 3-tier applications consisting of java client, web server and database.
POP3(Post Office Protocol) This protocol is used record application that retrieve email messages using POP3 from mail server.
RDP(Remote Desktop Protocol) This protocol is used to record applications which are running on remote machines such and connected through Microsoft Remote Desktop
RTE (Remote Terminal Emulator) This protocol is used to record applications that use terminals to give input and receive opput from the server.
SAP (Click & Script) This protocol is used record an applicaton that communicate between a browser and a SAP server.
SAP GUI This protocol is used to record application that are integrated key business using windows SAP GUI client.
SAP – Web This protocol is used to record applications that are using SAP web clients over HTTP to access SAP servers.
Siebel – Web This protocol is used to record applications that are developed using Oracle Siebel Customer Relationship Management.
Silverlight This protocol is used to record application that are developed using Microsoft Silverlight.
SMP (SAP Mobile Platform) This protocol is used to record applications that are developed for SAP Mobile Platform.
SMTP(Simple Mail Protocol) This protocol is used to record applications that are using SMTP protocol to access mail server
TruClient – Firefox / IE This protocol is used to record application that are developed using modern javascript that are used to perform user actions in the browser itself.
TruClient – Mobile Web This protocol is used to record application that are developed for modern javascript mobile browsers.
Web (HTTP/HTML) This protocol is used to communicate from a web browser to web server.
Web Services This protocol is used to record web services applications which is use to communicate between two applications over HTTP.
Windows Sockets The is a standard protocol to record network programming interface for the Windows platform.

Dt 1/2/2006
LoadRunner FAQ

What is the meaning of following extns : 1) .Usr, 2) .Lrs, 3) .Lrr ?
.usr - File Extension name vuser files created with Vugen .
*.lrs - Load Runner Scenario (Controller)
*.lrr- Load Runner Result (Analysis)


What is load testing?
- Load testing is to test that if the application works fine with the loads that result from large number of simultaneous users, transactions and to determine weather it can handle peak usage periods.
What is Performance testing?
- Timing for both read and update transactions should be gathered to determine whether system functions are being performed in an acceptable timeframe. This should be done standalone and then in a multi user environment to determine the effect of multiple transactions on the timing of a single transaction.
Did u use LoadRunner? What version?
- Yes. Version 7.2.
Explain the Load testing process? -Step 1: Planning the test. Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives.
Step 2: Creating Vusers. Here, we create Vuser scripts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.
Step 3: Creating the scenario. A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.
Step 4: Running the scenario.We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.
Step 5: Monitoring the scenario.We monitor scenario execution using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors.
Step 6: Analyzing test results.
During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunner’s graphs and reports to analyze the application’s performance.
When do you do load and performance Testing?
We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict(சித்தரிக்க) 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.
What are the components of LoadRunner?
- The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.
What Component of LoadRunner would you use to record a Script?
- The Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.
What Component of LoadRunner would you use to play back the script in multi user mode? - The Controller component is used to playback the script in multi-user mode. This is done during a scenario run where a Vuser script is executed by a number of vusers in a group.
What is a rendezvous point?
- You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.
What is a scenario?
- A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.
Explain the recording mode for web Vuser script?
- We use VuGen to develop a Vuser script by recording a user performing typical business processes on a client application. VuGen creates the script by recording the activity between the client and the server. For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser script.
Why do you create parameters?
- Parameters are like script variables. They are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the script is run. Better simulate the usage model for more accurate testing from the Controller; one script can emulate many different users on the system.
1. What criteria would you use to select Web transactions for load testing?
which includes what are the very commonly used transactions of the applications, we cannot load test all transactions, we need to understand the business critical transactions, this can be done either talking and getting details from the client or if it is existing application we can analyze from the web server logs which URLs has common hits, these needs to be converted into transaction and the based on the traceability we need to select the web transactions for load testing.
Per example: Login Scenarios, Buying from a website, flight reservation, booking a flight etc.
2. For what purpose are virtual users created?
Virtual users are created to emulate real users. To check for n no. of users at real time. So that load and stress test would be evaluated. Performance issues can be captured in many areas based on no. of VUsers. N no. of users accessing the application at a time brings the load and how exactly it controls the application.
3. Why it is recommended to add verification checks to your all your scenarios?
To verify the Functional flow verification checks are used in the scenarios
1. Each scenario is set of transaction in LoadRunner script.
2. Each transaction does have set of virtual user actions
3. To make sure that the VUser has passed the transaction scripts need the verification checks.
There are 2 types of verification checks.
Image verification check and Text verification check.
It is better practice to add verification check after each action is performed.
When a page is being requested from server , its not only important to know the time required for the page to download but also to make sure that CORRECT PAGE is being downloaded from server. Verification points in your scripts help you do that
4. In what situation would you want to parameterize a text verification check?
When you are expecting certain output/result so that the text verification check can be kept for the final results page which displays the content. So that this text verification check will be helpful in identifying the expected results.
5. Why do you need to parameterize fields in your virtual user script?
Parameters are like script variables. To perform script actions using different values we create parameters. To perform a transaction with multiple values we parameterized field in VUser script.
6. What are the reasons why parameterization is necessary when load testing the Web server and the database server?
Parameterization is done to check how your application performs the same operation with different data. In load runner it is necessary to make a single user to refer the page for several times similar in case of database server.
7. What are the benefits of creating multiple actions within any virtual user script?
Recording script in different actions is easy to maintain
Reusability. Repeatability, Reliability
What is correlation? Explain the difference between automatic correlation and manual correlation?
- Correlation is used to obtain data which are unique for each run of the script and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.
How do you find out where correlation is required? Give few examples from your projects? - Two ways: First we can scan for correlations, and see the list of values which can be correlated. From this we can pick a value to be correlated. Secondly, we can record two scripts and compare them. We can look up the difference file to see for the values which needed to be correlated. In my project, there was a unique id developed for each customer, it was nothing but Insurance Number, it was generated automatically and it was sequential and this value was unique. I had to correlate this value, in order to avoid errors while running my script. I did using scan for correlation.
Where do you set automatic correlation options? - Automatic correlation from web point of view can be set in recording options and correlation tab. Here we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.
What is a function to capture dynamic values in the web Vuser script? - Web_reg_save_param function saves dynamic data information to a parameter.
When do you disable log in Virtual User Generator, When do you choose standard and extended logs?
- Once we debug our script and verify that it is functional, we can enable logging for errors only. When we add a script to a scenario, logging is automatically disabled. Standard Log Option: When you select
Standard log, it creates a standard log of functions and messages sent during script execution to use for debugging. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled
Extended Log Option: Select
extended log to create an extended log, including warnings and other messages. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled. We can specify which additional information should be added to the extended log using the Extended log options.
How do you debug a LoadRunner script?
- VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution. The debug information is written to the Output window. We can manually set the message class within your script using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the script only.
How do you write user defined functions in LR? Give me few functions you wrote in your previous project?
- Before we create the User Defined functions we need to create the external library (DLL) with the function. We add this library to VuGen bin directory. Once the library is added then we assign user defined function as a parameter. The function should have the following format: __declspec (dllexport) char* <function name>(char*, char*)Examples of user defined functions are as follows:GetVersion, GetCurrentTime, GetPltform are some of the user defined functions used in my earlier project.
What are the changes you can make in run-time settings?
- The Run Time Settings that we make are: a) Pacing - It has iteration count. b) Log - Under this we have Disable Logging Standard Log and c) Extended Think Time - In think time we have two options like Ignore think time and Replay think time. d)General - Under general tab we can set the vusers as process or as multithreading and whether each step as a transaction.
Where do you set Iteration for Vuser testing?
- We set Iterations in the Run Time Settings of the VuGen. The navigation for this is Run time settings, Pacing tab, set number of iterations.
How do you perform functional testing under load?
-Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.
What is Ramp up? How do you set this?
- This option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a value to wait between intervals can be
specified. To set Ramp Up, go to ‘Scenario Scheduling Options’
What is the advantage of running the Vuser as thread?
-VuGen provides the facility to use multithreading. This enables more Vusers to be run per generator. If the Vuser is run as a process, the same driver program is loaded into memory for each Vuser, thus taking up a large amount of memory. This limits the number of Vusers that can be run on a single
generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number of
Vusers (say 100). Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.
If you want to stop the execution of your script on error, how do you do that?
-The lr_abort function aborts the execution of a Vuser script. It instructs the Vuser to stop executing the Actions section, execute the vuser_end section and end the execution. This function is useful when you need to manually abort a script execution as a result of a specific error condition. When you end a script using this function, the Vuser is assigned the status "Stopped". For this to take effect, we have to first uncheck the “Continue on error”option in Run-Time Settings.
What is the relation between Response Time and Throughput?
-The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second. When we compare this with the transaction response time, we will notice that as throughput decreased, the response time also decreased. Similarly, the peak throughput and highest response time would occur approximately at the same time.
Explain the Configuration of your systems?
- The configuration of our systems refers to that of the client machines on which we run the Vusers. The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools, etc. This system component configuration should match with the overall system configuration that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the load testing objectives.
How do you identify the performance bottlenecks?
- Performance Bottlenecks can be detected by using monitors. These monitors might be application server monitors, web server monitors, database server monitors and network monitors. They help in finding out the troubled area in our scenario which causes increased response time. The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc.
If web server, database and Network are all fine where could be the problem?
-The problem could be in the system itself or in the application server or in the code written for the application.
How did you find web server related issues?
-Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second that
occurred during scenario, the number of http responses per second, the number of downloaded pages per second.
How did you find database related issues?
-By running “Database” monitor and help of “Data Resource Graph” we can find database related issues. E.g. You can specify the resource you want to measure on before running the controller and than you can see database related issues
Explain all the web recording options? What is the difference between Overlay graph and Correlate graph?
- Overlay Graph: It overlay the content of two graphs that shares a common x-axis. Left Y-axis on the merged graph show’s the current graph’s value & Right Y-axis show the value of Y-axis of the graph that was merged.
- Correlate Graph: Plot the Y-axis of two graphs against each other. The active graph’s Y-axis becomes X-axis of merged graph. Y-axis of the graph that was merged becomes merged graph’s Y-axis.
How did you plan the Load? What are the Criteria?
- Load test is planned to decide the number of users, what kind of machines we are going to use and from where they are run. It is based on 2 important documents, Task Distribution Diagram and Transaction profile. Task Distribution Diagram gives us the information on number of users for a particular transaction and the time of the load. The peak usage and off-usage are decided from this Diagram. Transaction profile gives us the information about the transactions name and their priority levels with regard to the scenario we are deciding.
What does vuser_init action contain?
Vuser_init action contains procedures to login to a server.
What does vuser_end action contain?
- Vuser_end section contains log off procedures.
What is think time? How do you change the threshold?
- Think time is the time that a real user waits between actions. Example: When a user receives data from a server, the user may wait several seconds to review the data before responding. This delay is known as the think time. Changing the Threshold: Threshold level is the level below which the recorded think time will be ignored. The default value is five (5) seconds. We can change the think time threshold in the Recording options of the Vugen.
What is the difference between standard log and extended log?
- The standard log sends a subset of functions and messages sent during script execution to a log. The subset depends on the Vuser type Extended log sends a detailed script execution messages to the output log. This is mainly used during debugging when we want information about: Parameter substitution. Data returned by the server. Advanced trace.
Explain the following functions: -
lr_debug_message - The lr_debug_message function sends a debug message to the output log when the specified message class is set.
lr_output_message - The lr_output_message function sends notifications to the Controller Output window and the Vuser log file.
lr_error_message - The lr_error_message function sends an error message to the LoadRunner Output window.
lrd_stmt - The lrd_stmt function associates a character string (usually a SQL statement) with a cursor. This function sets a SQL statement to be processed.
lrd_fetch - The lrd_fetch function fetches the next row from the result set.
Throughput - If the throughput scales upward as time progresses and the number of Vusers increase, this indicates that the bandwidth is sufficient.If the graph were to remain relatively flat as the number of Vusers increased, it would
be reasonable to conclude that the bandwidth is constraining the volume of
data delivered.
Types of Goals in Goal-Oriented Scenario
-Load Runner provides you with five different types of goals in a goal oriented scenario:
The number of concurrent Vusers
The number of hits per second
The number of transactions per second
The number of pages per minute
The transaction response time that you want your scenario
Analysis Scenario (Bottlenecks): In Running Vuser graph correlated with the response time graph you can see that as the number of Vusers increases, the average response time of the check itinerary transaction very gradually increases. In other words, the average response time steadily increases as the load
increases. At 56 Vusers, there is a sudden, sharp increase in the average response
time. We say that the test
broke the server. That is the mean time before failure (MTBF). The response time clearly began to degrade when there were more than 56 Vusers running simultaneously.
1. What are the three sections of a Vuser script and what is the purpose of each one?1) Vuser_init - used for recording the logon.
2) Actions - used for recording the business process.
3) Vuser_end - used for recording the logoff.
2. For what purpose are Vusers created?Vusers are created to emulate real users acting on the server for the purpose of load testing.
3. What are the benefits of multiple Action files within a Vuser?They allow you to perform different business processes in one Vuser to represent a real user who does the same thing. They let you build Vusers that emulate real users defined in the User Community Profile. They also allow you to record the login and logoff separately from the Action files and thus to avoid iteration.
4. How can you tell the difference between an integer value and a string value in a VuGen script?Strings are enclosed in quotes; integers are not.
5. What is the purpose of a LoadRunner transaction?To measure one or more steps/user actions of a business process.
6. What is the easiest way to get measurements for each step of a recorded script? For the entire action file?Enable automatic transactions.(Runtime settings, Recording Options)
7. When would you parameterize a value rather than correlate queries?Parameterize a value only when it is input by the user.
8. What are the four selection methods when choosing data from a data file?Sequential, Random, Unique, and Same line as .
9. How can reusing the same data during iterative execution of a business process negatively affect load testing results?In reusing the same data for each iteration, the server recognizes the same data is requested and places it in its cache. The load test then gets performance results that are not based on real server activity but caching. This will not provide the correct results during the analysis of the load test.
10. How can caching negatively affect load testing results?
When data is cached in the server’s memory, the server does not need to fetch it from the database during playback. Then, test results do not reflect the same performance they would if real users were loading the system with different data.
11. Why is it recommended to add verification checks to your Vusers?You would want to verify, using LoadRunner that the business process is functioning as expected under load.
12. When does VuGen record a web_submit_data instead of a web_submit_form? Why? (Be as specific as possible)A web_submit_data is recorded when VuGen cannot match the action, method, data fields, and/or hidden data values with the page that is stored in the record proxy cache. Comparison failures are typically caused by something other than HTML setting the properties of the HTTP request. Because VuGen can parse only HTML, it cannot find all the properties of the HTTP request in memory. This results in the hard-coding of all the request information in a web_submit_data statement.
13. What do you need to do to be able to view parameter substitution in the Execution Log?Check extended log and Parameter substitution in the Run-Time Settings.
14. How can you determine which field is data dependent?Rerecord the same script using different input values, and then compare the two Scripts.
15. Where should the rendezvous be placed in the script?The rendezvous should be placed immediately before the transaction where you want to create peak load. In this case, the rendezvous should be placed right before starting the Update Order transaction.
16. For what purpose should you select continue on error?Set it only when making Execution Logs more descriptive or adding logic to the Vuser.
17. What is the purpose of selecting Show browser during replay in the General Options settings?This setting allows you to see the pages that appear during playback. This is useful for debugging your Vuser during the initial stages of Web Vuser creation.
18. What tools does VuGen provide to help you analyze Vuser run results?Execution Log, Run-Time Viewer, and Mercury Test Results window.
19. If your Vuser script had two parameters, “DepartCity” and “Arrival City,” how could you have the Vuser script return an error message which included the city names?lr_error_message (“The Vuser could not submit the reservation request for %s to
%s”, (lr_eval_string (“{DepartCity}”), lr_eval_string (“{ArrivalCity}”));
20. Why should you run more Vusers than your anticipated peak load?(1) To test the scalability of the system.
(2) To see what happens when there is a spike in system usage.
21. What is difference between manual scenario and Goal oriented scenario? What Goal Oriented scenarios can be created?
Manual scenario:
–Main purpose is to learn how many Vusers can run concurrently
– Gives you manual control over how many Vusers run and at what times
Goal oriented scenario:
– Goal may be throughput, response time, or number of concurrent Vusers
– LoadRunner manages Vusers automatically
Different Goal Oriented Scenarios are:• Virtual Users
• Hits per second
• Transaction per second
• Transaction Response time
• Pages per minute
22. Why wouldn’t you want to run virtual users on the same host as the Load-
Runner Controller or Database Server?
Running virtual users on the same host as the LoadRunner Controller will skew the results so that they no longer emulate real life usage. By having both the Controller and the Vusers on the same machine, the tester will not be able to determine the effects of the network traffic.
23. Each time you run the same scenario, the results will be slightly different. What are some of the factors that can cause differences in performance measurements?Different factors can effect the performance measurements including network
traffic, CPU usage and caching.
24. What are some of the reasons to use the Server Resources Monitor?
To find out how much data is coming from the cache
To help find out what parts of the system might contain bottlenecks
25. Explain the following:
Hits per second graph
The Hits per Second graph shows the number of HTTP requests made by Vusers to the Web server during each second of the scenario run. This graph helps you evaluate the amount of load Vusers generate, in terms of the number of hits.
Pages download per second graph
The Pages Downloaded per Second graph shows the number of Web pages (y-axis) downloaded from the server during each second of the scenario run (x-axis). This graph helps you evaluate the amount of load Vusers generate, in terms of the number of pages downloaded.
Transaction Response time (under load) graph
The Transaction Response Time (Under Load) graph is a combination of the Running Vusers and Average Transaction Response Time graphs and indicates transaction times relative to the number of Vusers running at any given point during the scenario. This graph helps you view the general impact of Vuser load on performance time and is most useful when analyzing a scenario with a gradual load.
Transaction Response time (percentile) graph
The Transaction Response Time (Percentile) graph analyzes the percentage of transactions that were performed within a given time range. This graph helps you determine the percentage of transactions that met the performance criteria defined for your system.
Network delay time graph
The Network Delay Time graph shows the delays for the complete path between the source and destination machines (for example, the database server and Vuser load generator).


Q1. What is load testing?
Ans. Load testing is to test that if the application works fine with the loads that result from large number of simultaneous users, transactions and to determine weather it can handle peak usage periods.

Q2. What is Performance testing?
Ans. Timing for both read and update transactions should be gathered to determine whether system functions are being performed in an acceptable timeframe. This should be done standalone and then in a multi user environment to determine the effect of multiple transactions on the timing of a single transaction.

Q3. What is LoadRunner?
Ans. LoadRunner works by creating virtual users who take the place of real users operating client software, such as sending requests using the HTTP protocol to IIS or Apache web servers. Requests from many virtual user clients are generated by Load Generators in order to create a load on various servers under test these load generator agents are started and stopped by Mercury's Controller program. The Controller controls load test runs based on Scenarios invoking compiled Scripts and associated Run-time Settings. Scripts are crafted using Mercury's "Virtual user script Generator" (named "V U Gen"), It generates C-language script code to be executed by virtual users by capturing network traffic between Internet application clients and servers. With Java clients, VuGen captures calls by hooking within the client JVM. During runs, the status of each machine is monitored by the Controller. At the end of each run, the Controller combines its monitoring logs with logs obtained from load generators, and makes them available to the "Analysis" program, which can then create run result reports and graphs for Microsoft Word, Crystal Reports, or an HTML webpage browser.

Each HTML report page generated by Analysis includes a link to results in a text file which Microsoft Excel can open to perform additional analysis. Errors during each run are stored in a database file which can be read by Microsoft Access.

Q4. What is Virtual Users?
Ans. Unlike a WinRunner workstation which emulates a single user's use of a client, LoadRunner can emulate thousands of Virtual Users.Load generators are controlled by VuGen scripts which issue non-GUI API calls using the same protocols as the client under test. But WinRunner GUI Vusers emulate keystrokes, mouse clicks, and other User Interface actions on the client being tested. Only one GUI user can run from a machine unless LoadRunner Terminal Services Manager manages remote machines with Terminal Server Agent enabled and logged into a Terminal Services Client session.

During run-time, threaded users share a common memory pool. So threading supports more Vusers per load generator.

The Status of Vusers on all load generators start from "Running", then go to "Ready" after going through the init section of the script. Vusers are "Finished" in passed or failed end status. Vusers are automatically "Stopped" when the Load Generator is overloaded.

To use Web Services Monitors for SOAP and XML, a separate license is needed, and vUsers require the Web Services add-in installed with Feature Pack (FP1). No additional license is needed for standard web (HTTP) server monitors Apache, IIS, and Netscape.

Q5. Explain the Load testing process?
Ans. Step 1: Planning the test. Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives.

Step 2: Creating Vusers. Here, we create Vuser scripts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.

Step 3: Creating the scenario. A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.

Step 4: Running the scenario. We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.

Step 5: Monitoring the scenario. We monitor scenario execution using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors.

Step 6: Analyzing test results. During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunners graphs and reports to analyze the applications performance.

Q6. When do you do load and performance Testing?
Ans. We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.

Q7. What are the components of LoadRunner?
Ans. The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.

Q8. What Component of LoadRunner would you use to record a Script?
Ans. The Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.

Q9. When do you do load and performance Testing?
Ans. We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.

Q10. What are the components of LoadRunner?
Ans. The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online. What Component of LoadRunner would you use to record a Script? - The Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.

Q11. What Component of LoadRunner would you use to play Back the script in multi user mode?
Ans. The Controller component is used to playback the script in multi-user mode. This is done during a scenario run where a vuser script is executed by a number of vusers in a group.

Q12. What is a rendezvous point?
Ans. You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.

Q13. What is a scenario?
Ans. A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.

Q14. Explain the recording mode for web Vuser script?
Ans. We use VuGen to develop a Vuser script by recording a user performing typical business processes on a client application. VuGen creates the script by recording the activity between the client and the server. For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser script.

Q15. Why do you create parameters?
Ans. Parameters are like script variables. They are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the script is run. Better simulate the usage model for more accurate testing from the Controller; one script can emulate many different users on the system.

Q16. What is correlation?
Ans. Correlation is used to obtain data which are unique for each run of the script and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.

Q17. How do you find out where correlation is required?
Ans. Two ways: First we can scan for correlations, and see the list of values which can be correlated. From this we can pick a value to be correlated. Secondly, we can record two scripts and compare them. We can look up the difference file to see for the values which needed to be correlated.

Q18. Where do you set automatic correlation options?
Ans. Automatic correlation from web point of view can be set in recording options and correlation tab. Here we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.

Q19. What is a function to capture dynamic values in the web Vuser script?
Ans. Web_reg_save_param function saves dynamic data information to a parameter.

Q20. Which is VuGen Recording and Scripting language?
Ans. LoadRunner script code obtained from recording in the ANSI C language syntax, represented by icons in icon view until you click Script View.

Q21. What is Scenarios?
Ans. Scenarios encapsulate the Vuser Groups and scripts to be executed on load generators at run-time.

Manual scenarios can distribute the total number of Vusers among scripts based on the analyst-specified percentage (evenly among load generators). Goal Oriented scenarios are automatically created based on a specified transaction response time or number of hits/transactions-per-second (TPS). Test analysts specify the % of Target among scripts.

Q22. When do you disable log in Virtual User Generator, When do you choose standard and extended logs?
Ans. Once we debug our script and verify that it is functional, we can enable logging for errors only. When we add a script to a scenario, logging is automatically disabled. Standard Log Option: When you select Standard log, it creates a standard log of functions and messages sent during script execution to use for debugging. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled Extended Log Option: Select extended log to create an extended log, including warnings and other messages. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled. We can specify which additional information should be added to the extended log using the Extended log options.

Q23. How do you debug a LoadRunner script?
Ans. VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution. The debug information is written to the Output window. We can manually set the message class within your script using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the script only.

Q24. How do you write user defined functions in LR?
Ans. Before we create the User Defined functions we need to create the external library (DLL) with the function. We add this library to VuGen bin directory. Once the library is added then we assign user defined function as a parameter. The function should have the following format: __declspec (dllexport) char* (char*, char*)

Q25. What are the changes you can make in run-time settings?
Ans. The Run Time Settings that we make are:
Pacing - It has iteration count.
Log - Under this we have Disable Logging Standard Log and
Extended Think Time - In think time we have two options like Ignore think time and Replay think time.
General - Under general tab we can set the vusers as process or as multithreading and whether each step as a transaction.

Q26. Where do you set Iteration for Vuser testing?
Ans. We set Iterations in the Run Time Settings of the VuGen. The navigation for this is Run time settings, Pacing tab, set number of iterations.

Q27. How do you perform functional testing under load?
Ans. Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.

Q28. How to use network drive mappings?
Ans. If several load generators need to access the same physical files, rather than having to remember to copy the files each time they change, each load generator can reference a common folder using a mapped drive. But since drive mappings are associated with a specific user:

Logon the load generator as the user the load generator will use

Open Windows Explorer and under Tools select Map a Network Drive and create a drive. It saves time and hassle to have consistent drive letters across load generators, so some organizations reserver certain drive letters for specific locations.
Open the LoadRunner service within Services (accessed from Control Panel, Administrative Tasks),

Click the "Login" tab.

Specify the username and password the load generator service will use. (A dot appears in front of the username if the userid is for the local domain).
Stop and start the service again.

Q29. What is Ramp up? How do you set this?
Ans. This option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a value to wait between intervals can be specified. To set Ramp Up, go to Scenario Scheduling Options.

Q30. What is the advantage of running the Vuser as thread?
Ans. VuGen provides the facility to use multithreading. This enables more Vusers to be run pergenerator. If the Vuser is run as a process, the same driver program is loaded into memory for each Vuser, thus taking up a large amount of memory. This limits the number of Vusers that can be run on a single generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number of Vusers (say 100). Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.

Q31. If you want to stop the execution of your script on error, how do you do that?
Ans. The lr_abort function aborts the execution of a Vuser script. It instructs the Vuser to stop executing the Actions section, execute the vuser_end section and end the execution. This function is useful when you need to manually abort a script execution as a result of a specific error condition. When you end a script using this function, the Vuser is assigned the status "Stopped". For this to take effect, we have to first uncheck the Continue on error option in Run-Time Settings.

Q32. What is the relation between Response Time and Throughput?
Ans. The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second. When we compare this with the transaction response time, we will notice that as throughput decreased, the response time also decreased. Similarly, the peak throughput and highest response time would occur approximately at the same time.

Q33. Explain the Configuration of your systems?
Ans. The configuration of our systems refers to that of the client machines on which we run the Vusers. The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools, etc. This system component configuration should match with the overall system configuration that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the load testing objectives.

Q34. How do you identify the performance bottlenecks?
Ans. Performance Bottlenecks can be detected by using monitors. These monitors might be application server monitors, web server monitors, database server monitors and network monitors. They help in finding out the troubled area in our scenario which causes increased response time. The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc.

Q35. If web server, database and Network are all fine where could be the problem?
Ans. The problem could be in the system itself or in the application server or in the code written for the application.

Q36. How did you find web server related issues?
Ans. Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second that occurred during scenario, the number of http responses per second, the number of downloaded pages per second.

Q37. How did you find database related issues?
Ans. By running Database monitor and help of Data Resource Graph we can find database related issues. E.g. you can specify the resource you want to measure on before running the controller and than you can see database related issues.

Q38. What is the difference between Overlay graph and Correlate graph?
Ans. Overlay Graph: It overlay the content of two graphs that shares a common x-axis. Left Y-axis on the merged graph shows the current graphs value & Right Y-axis show the value of Y-axis of the graph that was merged. Correlate Graph: Plot the Y-axis of two graphs against each other. The active graphs Y-axis becomes X-axis of merged graph. Y-axis of the graph that was merged becomes merged graphs Y-axis.

Q39. How did you plan the Load?
Ans. Load test is planned to decide the number of users, what kind of machines we are going to use and from where they are run. It is based on 2 important documents, Task Distribution Diagram and Transaction profile. Task Distribution Diagram gives us the information on number of users for a particular transaction and the time of the load. The peak usage and off-usage are decided from this Diagram. Transaction profile gives us the information about the transactions name and their priority levels with regard to the scenario we are deciding.

Q40. What does vuser_init action contain?
Ans. Vuser_init action contains procedures to login to a server.

Q41. What does vuser_end action contain?
Ans. Vuser_end section contains log off procedures.

Q42. What is think time?
Ans. Think time is the time that a real user waits between actions. Example: When a user receives data from a server, the user may wait several seconds to review the data before responding. This delay is known as the think time. Changing the Threshold: Threshold level is the level below which the recorded think time will be ignored. The default value is five (5) seconds. We can change the think time threshold in the Recording options of the Vugen.

Q43. What is the difference between standard log and extended log?
Ans. The standard log sends a subset of functions and messages sent during script execution to a log. The subset depends on the Vuser type Extended log sends a detailed script execution messages to the output log. This is mainly used during debugging when we want information about:

- Parameter substitution
- Data returned by the server
- Advanced trace

Q44. What is lr_debug_message?
Ans. The lr_debug_message function sends a debug message to the output log when the specified message class is set.

Q45. What is lr_output_message?
Ans. The lr_output_message function sends notifications to the Controller Output window and the Vuser log file.

Q46. What is lr_error_message?
Ans. The lr_error_message function sends an error message to the LoadRunner Output window.

Q47. What is lrd_stmt?
Ans. The lrd_stmt function associates a character string (usually a SQL statement) with a cursor. This function sets a SQL statement to be processed.

Q48. What is lrd_fetch?
Ans. The lrd_fetch function fetches the next row from the result set.

Q49. What is Throughput?
Ans. If the throughput scales upward as time progresses and the number of Vusers increase, this indicates that the bandwidth is sufficient. If the graph were to remain relatively flat as the number of Vusers increased, it would be reasonable to conclude that the bandwidth is constraining the volume of data delivered.

Q50. What are the various types of Goals in Goal-Oriented Scenario ?
Ans. Load Runner provides you with five different types of goals in a goal oriented scenario:

- The number of concurrent Vusers
- The number of hits per second
- The number of transactions per second
- The number of pages per minute

The transaction response time that you want your scenario Analysis Scenario (Bottlenecks): In Running Vuser graph correlated with the response time graph you can see that as the number of Vusers increases, the average response time of the check itinerary transaction very gradually increases. In other words, the average response time steadily increases as the load increases. At 56 Vusers, there is a sudden, sharp increase in the average response time. We say that the test broke the server. That is the mean time before failure (MTBF). The response time clearly began to degrade when there were more than 56 Vusers running simultaneously.


----- x ------ x ---------------------- x----------   x------------------   x ---------------x-------------- x-------x---

Software Requirement Specification Guideline
Version No: 0.1
Date: 17-Jul-2006














\














Revision History
Version No
Date
Prepared by/Modified by
Significant Changes
0.1
17-Jul-2006
Sundar ( Meenakshisundaram) Manickam
Initial draft




Table of Contents


1PURPOSE

The automated test scripts created by the testers should be read by any member of the team or by the customer in specific cases, it is imperative to have standards. The standards are to provide a consistent structure and style for the source code to make the understanding easier. Adhering to the defined coding standards early in the development process will significantly minimize maintenance and future development / enhancement costs

2SCOPE

The purpose of this document is to provide a list of recommended best practices in using Mercury Interactive LoadRunner 7.51 automated testing tool.

3INTENDED AUDIENCE

    The intended Audience of this document is the Covansys Testing Centre of Excellence team and other employees who need to understand the coding standards followed in any developed script.

4REFERENCES

  • Mercury Interactive LoadRunner Controller User guide
  • Mercury Interactive ‘Creating Vuser Scripts’.

5ASSUMPTIONS, CONSTRAINTS AND EXCLUSIONS

This document is created with an assumption that the audience of the document has got good knowledge on the tool.

6ENTRY CRITERIA

  • Stable application environment.
  • Functional IST and UAT signed off.
  • Machines, Networks, Database and parameters set-up.
  • Controlled test environment where no other instance or access is made during testing




7ENVIRONMENT SETTINGS

  • Any modifications to the default vugen.ini file should be done only after taking a backup of the original file.
Eg: Enabling of Multiple Protocol option in Vugen

  • Protocol should be identified based on the Architecture of the Application
Eg: Use Web (HTTP/HTML) protocol for all web based application

  • Prior to proceeding the script, Ensure Recording Option must be set and relevant protocol has been selected

  • Record the Business Scenario as defined earlier and reviewed and approved

  • Add Start and End Transaction point for each key/critical business flow eg. Login and Logoff to measure the Response Time in secs

  • Stop Record after recorded complete transaction

  • Variables

Variable declarations in LoadRunner requires a data type,
Eg:
int count, total = 0;
char buffer[1024];
long file_stream;
char *filename = "c:\\readme.txt";


8STANDARDS FOR CREATING LOADRUNNER TEST SCRIPTS

Recoding Options:

The recording mode you select depends on your requirement and environment. The available modes are HTML-based script and URL-based script.

The HTML-based script mode generates a separate step for each HTML user action.

The URL-based script recording mode captures all HTTP requests sent to the server, the recording mode captures even non-HTML applications such as applets and non-browser applications.



  1. Required Component should have been installed and verified against the sample
Application.
  1. Header: All the Script files should begin with a comment that lists the script name, description of the script, version information, date and copyright notice etc as shown below.


/*******************************************************************/
// Script Name : //
// Script Description : //
// Version Information : //
// Date Created : //
// Copyright Notice : //
// Author : //
/*******************************************************************/
//
/*******************************************************************/
// Pre-Conditions :
// Post Conditions :
// Data Files :
//******************************************************************/
//
//******************************************************************/
// Variables :
//
/******************************************************************/
// Revision History
/******************************************************************/
// Date :
// Revised By :
// Details :
/******************************************************************/

  1. The part of the application, which needs to be iterated, must be recorded in Action part of the Script.
Eg.Login part of the application must be recorded in Vuser_init part where as the transaction which is to iterated must be recorded in Action part and Log off part must be recorded in Vuser_end part
  1. Create a Template script with the test header as shown above and save it with the name "template".
  2. Open the template script in LoadRunner and do ’File’-’Save as’ to avoid working with a noname test.
  3. Naming Conventions: The scripts will be named as an acronym that represents the module name and Transaction description of what the script does. Given below is an example:
Module Name
Transaction Description
Resulting Name
Purchase Order
Approve Standard Purchase Order
PO_Approve_Standard_PO
General Ledger
Inquiry
GL_Inquiring_on_a_Journal



Few guidelines to follow while naming the file:

  • The entire file name saved is below 25 Character for easy reference (Legally up to 255 characters are supported).

  • Usage of special characters on the test script name like “*&^#@!” etc should be avoided.

For Scenarios:
  • File name should start with the word “Scen_” identifying the script file as Scenarios followed by the Project Name.
Eg: Scen_OM_Copy_Order
For Reports:
  • File name should start with the word “Rep_” identifying the script file as Reports followed by the Project Name, No of Vus and Iterations.
Eg: Rep_PO_Order_100Vus_100


Data Files:
  • Data File name should be the same as the corresponding Parameter Name eg. For User_Id and Password parameter data file name should be User_Id.dat but it must have two column with column name as User_Id and password

User_Id
Password
CVNS
Loadtest
dd128892
test


  • It is always better to reduce the no of data files to minimize resource utilization


Correlation:

To ensure before simulating multiple Virtual Users (Vus) script must be correlated to avoid duplication of dynamic value.

Eg. Session Id (Web Application)

Action ()
{
web_reg_save_param("A", "LB/ic=<a href=", "RB=\'>", "Ord=All", LAST);
}

Parameterization:

To ensure before simulating multiple Virtual Users (Vus) script must be parameterized to avoid repetition of same data

Eg. Login Id and Password for accessing Web mail
Highlight the value-> RightClick -> Choose the Replace with parameter -> Enter the parameter name-> click properties-> choose the file-> choose the name -> select the next row to choose the value to replace.


Transactions:

To measure the server response time for a Vuser request. A continuous flow of a sequence can be made as a transaction (i.e.) you insert Vuser functions to mark the beginning and the end of a task.

Eg.
Action ()
{
lr_start_transaction("INV_Add_Items_to_Staging"); //To start a transaction
………
lr_start_sub_transaction(“test”, “INV_Add_Items_to_Staging”); // To start
a sub transaction
………
……...
lr_end_sub_transaction(“test”, LR_AUTO);//To end a sub transaction
………
lr_end_transaction("INV_Add_Items_to_Staging", LR_AUTO); //To end a
transaction
}

Vuser Status:

Scripts output the status of each vuser iteration executed, the lr_vuser_status_message function sends a status message to the Vuser log. The lr_whoami function returns Vuser Group and Id, lr_log_message sends a message to the Vuser log file , lr_output_message sends a message to the Controller Output window, lr_error_message sends an error message to the LoadRunner Controller's output window and web_get_int_property to return http status code.

Action()
{
int id, http_status_code;
char *vuser_group;

lr_vuser_status_message ("End of Action");

lr_whoami(&id, &vuser_group, NULL);

lr_log_message(“Virtual User: %s %d start login ...", vuser_group, id);

lr_output_message("Log message");Output: Actions(4): Log message

lr_error_message("Error: %s", "Error message");

http_status_code=web_get_int_property(HTTP_INFO_ERROR_CODE);

if (http_status_code == 200)
lr_log_message(“Successfully accessed”)
elseif(http_status_code == 404)
lr_log_message(“Page not found”)
elseif(http_status_code == 302)
lr_log_message(“Page found”);

return 0;
}     

Verification Points:

To ensure the text/image object exists on the webpage. The checkpoints can be only be used for Web(HTTP/HTML) protocol.

Check for URL Based Mode Recording
Action ()
{
web_reg_save_param("Status_Check",
"LB= Performance Test ",
"RB= completed in successfully ",
"Ord=1","Found=Test1", "Search=body", LAST);
return 0;
}

Check for HTML Based Mode Recording
Action ()
{
web_image_check("Home", "Alt=home2.gif", LAST);

web_find("web_find", "Right Of=completed in successfully", "LeftOf=Performance Test",
"What=Test1 ",LAST);
return 0;
}


Dry Run:

  • Perform dry run to ensure the script reliability and ready for simulating multiple Vuser

Scenario Creation:

  • To ensure Vuser License for number of VUS
  • Choosing the scenario type based on client requirement.
  • To ensure allocation of Vusers to each client based on configuration of clients.
  • Choosing execution mode (process/thread)



Monitor Options:

  • Make sure selection of monitoring option only for relevant parameters otherwise it may cause enormous resource utilization.
  • Types of Application server.
    • WebSphere server
    • Welogic server
    • WebSphere server (EPM)
    • Welogic server (JMX)
    • Oracle91AS HTTP Server
    • Silver Stream
    • IPlanet

  • Types of database server.
    • DB2
    • Oracle
    • SQL Server
    • Sybase

  • Types of system resources.
    • Windows resources
    • Unix resources

  • Network delay monitor.

9SCRIPT BODY CONVENTIONS

Each functional section should contain lr_log_message function to debug the script easily.

10 SCRIPT STORAGE

    LoadRunner recognizes the test script as a file, which is stored as a directory in the Operating System.
  • It is good practice not to modify or delete anything inside these directories manually without being an expert.
  • All scripts must be organized and should follow a hierarchy.
  • An excel sheet must be maintained with the following columns to be beneficial for the entire team:
  • S.No
    • Test Script Number
    • Description of the Test
    • Parameter List and No of datas
    • Assignment of Vus for corresponding Script


11 INDENT

Try to avoid manual alignment excluding header information and comments

12 COMMENTS

Comments make the script readable and simple to understand. Comments should never include Special Characters such as form feed.

It is mandatory to add comments to all variable declarations. The comments to the Variable declarations should be detailing on what type of data gets assigned to the variable in the program.

Conditions should have comments detailing on what the value is been evaluated for.

Parameterization and correlation should have comments detailing on what the value is been replaced

Function calls should have comments detailing the values passed and if the function returns a value, where the value returned is captured should also be noted down.

In Case of any modifications done to the code, it is mandatory to add the modification code in the start and end line of the modification done.

Eg:

Statement 1;
Statement 2;
Statement 3; # Code Modified, since Functionality changed Refer XCV234e7
Statement 4;
Statement 5;
Statement 6; # Code Modified, since Functionality changed Refer XCV234e7
Statement 7;

It is mandatory to comment any test call.

NOTE: The frequency of comments sometimes reflects poor quality of code. Whenever the project Team member feels compelled to add a comment, the most preferred solution is rewriting the code to make it clearer.


13 OTHERS

  • Each Script should have the ability to start and drive the application to the initial position and also should clean up the application to increase independency between them.

  • Maintenance of Script folder that has unwanted files and results folder must be cleaned periodically.

  • Back up of all the scripts (zipped) must be taken and kept safely. Use of scripting repository like TestDirector would help in the easy management of test scripts.

14 CONCLUSION

Standards should be followed for the value they bring in to the project and not just as rules. However, following standards should not become an additional task in the project span. This document is prepared with due consideration of not increasing the load to the project team just by following standards.

No comments:

Post a Comment