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.


 

Correlation in Load Runner

What is Correlation?

Correlation is a mechanism of handling the dynamic values passed from the server to the script. Correlation is important aspect which will let the script run end to end without any error.

Why we should handle the correlation in the script?

Lets take a example of session id generation.

Recording :

  • While Recording an application, the vugen will sends a request to the application server to start a new session.
  • Server receives the request from the Vugen and assign a new session ID ABCDF.
  • Vugen will stores the session id ABCDF in the script.
  • Start the session with ID ABCDF and send a request to a application server to allow the Vugen to record the flow.
  • Therefore Application server recognizes the ID ABCDF and allows the Vugen to record the script.

Reply :

  • While Replaying the record script, the Vugen script will sends a request to the server to start a new session.
  • Application server will receives the request, and start the new session ID XYZ.
  • But while recording the Vugen would have stored the session id as ABCDF and now the server is expecting the new session if XYZ.
  • Therefore the application server will reject the request to reply script with the old session.

Solution :

  • Capture the session id into a variable which is generated from the application server at the initialization of the application.
  • Replace the variable(Captured value variable) in the place of old session id(ABCDF) in the script.
  • Therefore when application is started, now the new session id is captured in a variable and passed to the next request. And the application will run without any error or failure.

Different types of correlation present in loadrunner?

  • Auto Correlation.
  • Manual Correlation.

Auto Correlation :

It is the easiest way of doing the correlation in the load runner application. VUGen will require you to run a recorded script at least two times so it can internally compare the varying values in the server response. Its seems the easiest way to do it but most of the time the auto correlation will not be working. Therefore it is not recommended to use this method.

One can configure automatic correlation at the time of recording using the below steps.

  • Create the rules in the Recording Option before recording the script . Click on Record =>Recording Options=>Rules.

Correlation Rules

  • Then make sure the scan for correlations applying is as per the below snap shot.

Correlation Configuration

Manual Correlation :

Its the most important  method used to capture the dynamic values in the loadrunner.  Its directly added the function into the script to capture the values and passed it.

Therefore below are the steps involved in capturing the dynamic values.

  • Identify the dynamic value in the script which need to handled.
  • Find the first occurrence of the dynamic value in the script.
  • Find the correct left and right of the dynamic values.
  • Add web_reg_save_param function to the script above the request where the first occurrence of the dynamic value was found.
  • Pass the correlated values in the script.

Click on web_reg_save_param to know the important parameters of the function.

Correlation Manual

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

Performance Testing Tools

Load Runner (HP/MircoForces Team)

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. It 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.

Load Runner is the enterprises edition where you need to buy the load generate as per your application usage.

Click here to learn more about Load Runner

Download Load Runner Application Here

NeoLoad

NeoLoad is also performance tool which is enterprise edition. Some of the benefits of NeoLoad are

Benefits of Load Testing with NeoLoad

  • Supports Performance testing of all standard and rich applications (RIA) for desktop and mobile devices.
  • Conducts Load testing for CRM, ERP and Business Intelligence – type applications.
  • Monitors all major servers available on the market.
  • Enterprise-class: efficient and infinitely scalable, infrastructure monitoring capability, APM tools integration.
  • Easy-to-use load testing tool: scriptless test creation, GUI-driven design, automated parameterization.
  • Quick time-to-value: helps you create realistic tests in minutes! Automated report generator.
  • Cost-effective: low cost licensing and maintenance, flexible licensing options.
  • Excellent productivity: test more often with the same resources for a superior return on investment (ROI).
  • Fully integrated on-demand load generation from the cloud.

Download NeeLoad Application Here

Apache JMeter

Jmeter application is open source software, a 100% pure Java application designed to do load testing and measure the  performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

Some of the benefits of Jmeter are

  • Ability to load and performance test many different applications/server/protocol types:
    • Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET, etc)
    • SOAP / REST Webservices
    • FTP
    • Database via JDBC
    • LDAP
    • Message-oriented middleware (MOM) via JMS
    • Mail - SMTP(S), POP3(S) and IMAP(S)
    • Native commands or shell scripts
    • TCP
    • Java Objects
  • Full featured Test IDE that allows fast Test Plan recording (from Browsers or native applications), building and debugging.
  • Command-line mode (Non GUI / headless mode) to load test from any Java compatible OS (Linux, Windows, Mac OSX, …)
  • A complete and ready to present dynamic HTML report
  • Easy correlation through ability to extract data from most popular response formats, HTML, JSON , XML or any textual format
  • Complete portability and 100% Java purity.
  • Full multi-threading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
  • Caching and offline analysis/replaying of test results.

Download Jmeter Application Here

WebLOAD

WebLoad tool is used for performance testing and it is Enterprise edition

Benefits of WebLoad application are

  • WebLOAD’s IDE offers correlation, parameterization, response validation, messaging, native JavaScripting and debugging.
  • A Load Generation Console generates massive virtual user load – locally and on the cloud, on Windows or Linux, via AWS or other cloud providers.
  • Analytics dashboards provides over 80 configurable report templates for root cause analysis and let you share results across distributed teams.
  • Integrations let you use WebLOAD together with APM tools (Dynatrace, AppDynamics, New Relic), open source software (Selenium, Jenkins), mobile testing (Perfecto Mobile).

Download WebLoad Application Here

Silk Performer

Micro Focus Silk Performer is designed to deliver a consistent user experience anytime, anywhere, and on any device. It is also the enterprises editions

Benefits of Silk Performer

  • Efficiently create load tests that reflect real world user behavior, configurations and conditions
  • Quickly isolate and root cause performance issues with powerful diagnostics
  • Assess global readiness with unlimited scalability from the Cloud
  • Validate real time user experience with performance tracking and transaction monitoring
  • Re-Use Functional Test Assets for Performance Testing and Monitoring
  • Unlimited scalability from the Cloud
  • Validate and monitor user experience with advanced diagnostics.
  • Leading web support for load and stress testing
  • Comprehensive mobile performance testing

Download Silk Performer Application Here