Ajax TrueClient LoadRunner Tutorials

Ajax TrueClient LoadRunner Tutorial

Training Summary

Ajax TrueClient protocol in the loadrunner.  Ajax TrueClient protocol is mainly used to do the user side testing or the behavior of the browser side. So it is a heavy protocol due to which the number of load generator for the execution will be more compared to web scripts.

Syllabus


1. Tutorial  -> How to record Ajax TrueClient script in Loadrunner.


2. Tutorial -> How to add Parametrization in Ajax TrueClient script.


3. Tutorial -> How to Capture the values in Ajax TrueClient script.


4. Tutorial -> How to add Transactions in Ajax TrueClient Script.


5. Tutorial -> How to Call external C- Function in Ajax TrueClient Script.


6. Tutorial -> Adding VTS Functions to the Script.


7. Tutorial -> Different Vuser Function present in Ajax TrueClient Script.


8. Tutorial-> Interview Questions for Ajax TrueClient Script.


9. Tutorial-> Quiz related Ajax TrueClient Script.

LoadRunner Tutorials

HP LoadRunner Tutorial

Training Summary

LoadRunner is the product from Micro Focus Company currently earlier it was with HP Team. Loadrunner is the most widely used tool for performance testing as it support multiple protocol and also its user friendly compared to any other tools in the market. Here we will be seeing each part of the loadrunner and its working step by step. And also there are multiple post related to Loadrunner and at last you can test your understanding using quiz.

Syllabus


Tutorial  -> Architecture of Loadrunner and Introduction to Loadrunner


Tutorial -> Recording Options in Loadrunner.


Tutorial -> How to record web script in Loadrunner.


Tutorial -> How to do Parametrization in Loadrunner.


Tutorial -> How to do Correlation in Loadrunner.


Tutorial -> How to use Web_reg_save_param for Correlation.


Tutorial -> Loadrunner Functions


Tutorial -> Interview Questions


Tutorial-> Quiz to test your understanding on Loadrunner.


 

Recording Option In VUgen Load Runner

Recording Option Present in Vugen

General => Recording:-

In Recording Option, the recording is one of the important ways of recording the scripting Vugen. They are

  • HTML - Based Script :

    • In HTML mode, only the end user action performed by the user will be capture. Therefore the script will have only the action which performed by user in form of web submit request.  The other url in the page will not be captured.
  • URL Based Mode:

    • All the urls present in that particular page will be captured in script. Most importantly all the java script in the page will also be recorded in this mode.  Any action or url which is not able to be captured by the HTML mode will be captured in URL mode.

Recording Option- Record Mode

 

General => Script:-

In Script section of recording option. We will see the basic information about the language which is used to record the script.  You can change the language before the recording of the script. Best practice not to change the language because we might be seeing some error during the scripting and modification. the protocol will be used. And some of the other important options as well where we can define it.

  • If you check the AUT box then all the AUT process which automatically be closed once the recording will be stopped.
  • Next option where you can explicitly specific how much think time it should be added after end of each transaction. If you check this box then the think time will be auto added with the specified value after each transaction.
  • So you can specific explicitly to generate the event log for recording. It will contain what are the action which we performed during recording of the script step by step.
  • Even we can specif to generate a think time if a particular request take more than the time specified in this section.
  • Importantly the Number of lines to be there in each action will be specified here. If your script is very long and your script flow will be taking more than 60000 lines then you can change the number of lines here.

General => Protocol :-

Here you let you know what all type of protocol you have selected for this script. If you have selected multiple protocol during script creation  and you need only one protocol to record , so you can select the protocol which you need for recording. Example : Your using two different protocol for your script, one for logging into the application(Remote Desktop) and then your recording the script, therefore you can use  by selecting the required option in protocol section during recording.

General => Code Generation

If you want to search for the automation correlation in the recorded script you can use this option. Importantly if you don't want to run the auto correlation scan after the script recording is completed then you can opt out of this option. And also it will search for Aysnc call in the recorded script, if you know that your application is not having any Aysnc call then you can unchecked this option. Therefore the best idea is to go with both the option checked.

Correlation => Configuration

It has three section in this configuration

  • First section is scan section, where it will scan for the Rules of auto correlation and after the recording and even in the replay log the scan will happen.
  • In second section you can select what values to be ignored and what api need to be used for auto correlation.
  • Third section where you will specif with which the text need to be compared.

Correlation => Rules

Here you can write your left boundaries and right boundaries for your auto correlation for each type of protocol in this section. Beside that even you you can import the correlation rules from different script and you can export the rules created in this script.

HTTP Properties => Advanced

It offers various settings related to HTTP binding. Reset context for each action, enabling this option instructs VUGen to reset all HTTP contexts between actions to their initial state before recording, providing a clean beginning for the recording session.

  • And snapshot of recording can be saved locally for reference.
  • Generation of web_reg_find  function for all the pages
  • It can add a comment to the HTTP error message from the server
  • It can parameterize  there server side names.
  • Generate Cookies and web socket traffic in the script.
  • Replace a parameterize with coded values and even you can add header to your scripts.

Network => Mapping and Filtering

It is the most important section where the traffic of the recorded script will go pass through and get recorded. We have three option in Mapping and filtering where each option will different purpose,

  • Socket level data:-
    •  Socket level data will select this option for most of the web browser application in recording option. Because the data which will pass from browser to Vugen will talk through sockets.
  • WINLet level data:-
    • WINLet level data will be used for Desktop application to record the traffic between the application.
  • Socket/WINLet Level data:-
    • By default option used for most of the application. Because only if there data is recording in this option we change to other option and try to record the script.

How to record VUgen web script(HTTP/HTML)?

How to record VUgen web script(HTTP/HTML)?

Below are steps used for recording the web scripts

Launch HPE VUgen application.

Vugen Page

Once the application is launched, click on File ->New Script/Solution.

Create New Script Window will  be displayed. Most important section needed be selected/updated.

  • Protocol:-

    • You need to select single or multiple protocol for your recording the application. For example :- If you are using multiple protocols like RDP for logging in and browser for recording end user action. Then you need to select multiple protocols. But most of the application we will be going with the single protocols.
    • Select Web - HTTP/HTML Protocol from the window.
  • Script Name:-

    • Enter the appropriate name of the script in the Script Name Section.
  • Location:-

    • Select the directory where you need to select the script in the script directory section.
  •  Click on Create Button

Vugen Recording Window

Click on Recording Option->Recording from the menu bar.Recording Option Window will be displayed with the following sections.

  • Action Selection:-

    • Select the action(Section) where you want the script to be recorded when you start recording.
      • Vuser_int where you will record the action such as login or one time action.
      • Action, its the important section where main end user action will be recorded. And also it will be used to iteration the functionality.
      • Vuser_end where you will record the logout part.
  • Recording Mode:-

    • Record; If you are recording the web application then you need to select the Web Browser. And if you need to the record the desktop application then select Desktop application.
    • Application, Select the web browser in which you will recording the application.
    • URL address : Provide the application path or the web url of the application.
  • Setting:-

    • Check the box when you want to start the recording in the Start Recording option.
    • Provide the directory where your script need be working.
  • Click on start Recording.

Vugen Recording Section

 

Recording window will be opened. Where you can enter the transaction names, comments during the Recording phase. And even here you can change the action where scripts need to be recorded.

Vugen Recording Secition

Click on Stop Button, the script will be recorded and displayed as shown below. Script recording is completed you can start the modularisation of scripts.

Write your queries in the comment section will get back to you as soon as possible.

Load Runner and Architecture

What is Load Runner?

Load Runner is one the most used performance tool in the market. The tool was with HP still 2016 and it was bought by microforces Company. Load Runner will support all the protocol.

And it is very user friendly compared to any other performance testing tool. It works on a principal of simulating Virtual Users on the subject application. These Virtual Users also termed as VUsers, replicate client's requests and expect a corresponding response to passing a transaction.

Architecture of Load Runner and Components

Architecture Diagram- Load Runner

Most important components in the Load runner are:-

Vugen

VUGen or Virtual User Generator is an interface to record the end user action. Script will be used to simulate the end each user action as real user on the application. Using single Vugen script we can simulate multiple user with different credential on the application. Tester can parametrize and use the same script by  passing different values to the application.

VUGen can be used record and simulate following processes:-

  • Online Booking
  • Customer Care Application
  • Mobile Application
  • SAP Application

Vugen

Controller/Performance Center

Controller or performance center is most important component in Load Runner because once a VUser script is finalized, then the script is uploaded into controller. Controller is the one which will simulate the load on the application.

Most important steps used to simulate the load on the application using controller:-

  • Type of scenario can be selected in the controller that is goal oriented scenario or basic scenario.
  • Uploading of the scripts into scenario
  • Number of  Vuser for each script and the total number of Vuser for the scenario.
  • Number of load generator for the scenario.
  • Calculation of pacing for each script.
  • Calculation of Ramp up that is duration for all the users to be running on the application.
  • Duration of the test.
  • Calculation of Ramp down that is duration for all the users to be logging out of the application.

Controller

Load Generator

Load generator is the important component which is used to inject the load on the application. Most importantly assigning of number of  load generator depends upon the protocol selected,number of scripts and number of lines in the scripts because each VUsers will be using resources like memory and CPU. So the best practice is to assign the controller separate and load generator separate for the scenario.

Analysis

Analysis is the last component of the load runner. Once the execution of the scenario is completed analysis component will be used to display the results collected by the controller. It will also display the graphs for analyzing the execution.

Some of the important graphs used to analyse the result are :

  • Hits per second.
  • Throughput.
  • Running the VUsers.
  • Average response time.
  • Transaction response time.
  • Error rate.
  • Total pass/fail rate.

Analysis