Interesting articles that improve the performance of performance testing...
C program to convert a text into its equivalent hexadecimal value to be used in Loadrunner
Loadrunner has a built in function called web_convert_param function which converts HTML to a URL or plain text or the vice-versa.
But in my case, I had a file upload script in which the text files names that are uploaded are converted into its equivalent hexadecimal value and they were passed in the request url.
Since they were passed in the url the hexadecimal values were also appended with %.
For example
Text File uploaded : text vinoth.txt
hexadecimal value passed in the url: 74%65%78%74%20%76%69%6E%6F%74%68%2E%74%78%74%
Below is the C program which does the above conversion (Plain Text to Hex conversion)
But in my case, I had a file upload script in which the text files names that are uploaded are converted into its equivalent hexadecimal value and they were passed in the request url.
Since they were passed in the url the hexadecimal values were also appended with %.
For example
Text File uploaded : text vinoth.txt
hexadecimal value passed in the url: 74%65%78%74%20%76%69%6E%6F%74%68%2E%74%78%74%
Below is the C program which does the above conversion (Plain Text to Hex conversion)
Output:
VB Script to fetch the names of sub folders in a folder and write it to a text file
Say for example we have different file upload scenarios and we have kept the files in different folder accordingly and we have to input the file path along with the file name. Doing this manually is tedious.
So the below VB script simplifies the work, all it does is it reads the sub folder names under the parent folder that we input and writes it to the output by concatenating the both.
VB Script:
If at all you want only the subfolder name to be written to the Output file then
comment out --- logFile.writeline FilePath
&
remove the comment from --- logFile.writeline(objSubFolder.name)
comment out --- logFile.writeline FilePath
&
remove the comment from --- logFile.writeline(objSubFolder.name)
VB script to fetch the file names and write it to a text file
We all have come across a loadrunner script in which file upload will happen and we would have parameterized the file path & file name. Consider if we have 1000's of files and we need to give them as parameter input. So entering the file path and file name manually into the file parameter would be a time consuming process.
Below VB script simplifies the above process by just a click. All we have to do is to input the file path where inputs files are placed and mention the output file to write the the same.
VB Script:
If at all you want only the file name to be written to the Output file then
comment out --- logFile.writeline FilePath
&
remove the comment from --- logFile.writeline(file.name)
Below VB script simplifies the above process by just a click. All we have to do is to input the file path where inputs files are placed and mention the output file to write the the same.
VB Script:
If at all you want only the file name to be written to the Output file then
comment out --- logFile.writeline FilePath
&
remove the comment from --- logFile.writeline(file.name)
Subscribe to:
Posts (Atom)
Most Viewed
- web_concurrent_start & web_concurrent_end
- lr_read_file Loadrunner Function to read the content of a text file
- Standard deviation and its importance in performance testing
- C Program to write loadrunner parameter output to text file
- SaveOffset attribute in web_reg_save_param
- Loadrunner scripting for Rest API services - web_custom_request
- Pacing Calculation in Loadrunner - Performance Testing
- what is GC Suspension Time or GC Pause Time?
- Parameterization in TruClient Protocol Loadrunner - JavaScript Based (Method 2 - LR.getParam)
- Parameterize the object xpath in TruClient Protocol Loadrunner - JavaScript Based