Sample code and tutorial here
Overview
JavaScript is popular now.
This is one of a series on how LoadRunner has embraced JavaScript:
-
Scripting in JavaScript language (instead of C or Java).
Here are examples of each.
Create TruClient scripts with JavaScript
Download Zip of the UISamples TruClient script repository at:
https://github.com/TruClient/UISamples
There are several TruClient scripts there, each in a separate folder.
The HP example shows a website that can only be load tested using TruClient (not C programming).
I created a whole 2-day hands-on class explaning these.
It is a good example of string and number functions within JavaScript.
Call me to get up and running on TruClient quickly.
Call JavaScript within a LoadRunner C-language script
A tutorial on how you can create and use a JavaScript file within a LoadRunner C-language script (using Agile principles) is in the README.md file within the the random_birthdate_js folder at:
https://github.com/wilsonmar/LoadRunner/tree/master/random_birthdate_js
Download a Zip the whole set of LoadRunner sample scripts from:
github.com/wilsonmar/LoadRunner
If you have a Git client, clone the set of LoadRunner sample scripts using command:
git clone https://github.com/wilsonmar/LoadRunner.git
Call me to get good at JavaScript without wasting a lot of time.
Script LoadRunner in JavaScript language
The tutorial on coding JavaScript within a LoadRunner Web (HTTP/HTML) protocol script is at:
wilsonmar.github.io/LoadRunner-JavaScript-Coding
The sample script referenced by this tutorial is at:
github.com/wilsonmar/LoadRunner
Resources to Learn JavaScript
There are many tutorials which teach JavaScript string manipulation and other topics:
- freecodecamp.com has learners use tutorials on codeacademy.com and other sites, then adds quizzes, all for free.
Wait, there’s more. Click one of these …
This article is one of a series about tuning and performance:
- Performance testing in the cloud era
- Perftest (Performance Testing and Engineering)
- Agile Performance Testing and Engineering
- Build load-balanced servers in AWS EC2 using CloudFormation
- JMeter in the cloud for distributed performance testing
- TruWeb performance testing on macOS and Linux clients
- JavaScript in LoadRunner
- LoadRunner Javascript coding
- LoadRunner 12.55 installation
- WebTours configuration in LoadRunner and others