Testing is Rocket Science Not Brain Surgery

Almost all of the World’s Greatest Accomplishments Were The Result of Great Planning!

Testing is Rocket Science Not Brain Surgery header image 2

Code Snippets(HP LoadRunner): Decrypting Passwords and Using those Values in a web_submit statement

May 7th, 2008 · No Comments

Table of contents for Code Snippets(HP LoadRunner)

  1. Code Snippets(HP LoadRunner): Randomly Selecting an Array of Values and Using That Value As A Parameter
  2. Code Snippets(HP LoadRunner): Decrypting Passwords and Using those Values in a web_submit statement

declare either as a global in the globals.h available in multi-protocol scripts or outside of the vuser_init

//placeholder variables
char *Temp;
char decrypted_password;

//Retrieves the paramater value and decrypts it.
Temp = lr_eval_string(”{UserPwd}”);
Temp = lr_decrypt(Temp);
//optional output of decrypted parameter value
//_output_message(”%s”, Temp);

//creates a new parameter that can be used in a text string with paramater delimiters
lr_save_string(Temp, “decrypted_password”);

For example:
web_submit_data
.
.
“Value={decrypted_password}”, ENDITEM

A trivial but useful code snippet to meet security requirements when the login credentials are being passed outside the company in a hosted Performance Center solution and/or where electronic submission or network storage is being used.

Tags: Performance Testing · Testing

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment