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 4

Entries Tagged as 'Code Snippets'

Code Snippet(HP LoadRunner) : FILE I/O and creating dummy XMLs

September 27th, 2012 · 1 Comment · Code Snippets, Performance Testing, Testing From The Field

This is a code dump of a XML file generator I threw together to create multiple child nodes under what was essentially a header in the XML file, along with generating multiple files iteratively. The actual number of iterations was controlled by the number of iterations specified in the run-time settings, the number of child […]

[

Tags: ··

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

May 7th, 2008 · 1 Comment · Code Snippets

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 […]

[

Tags: ··········

Code Snippets(HP LoadRunner): Randomly Selecting an Array of Values and Using That Value As A Parameter by Howard Clark

February 6th, 2008 · 3 Comments · Code Snippets

int TotalNumberOfBUIDs; char TotalNumberOfBUIDschar[3]; //working variable char *AvailableBUIDsparam; //working variable web_reg_save_param(“AvailableBUIDs”, “LB/IC=class=’PSSRCHRESULTSODDROW’ >”, “RB/IC=”, “Ord=All”, “Search=Body”, “RelFrameId=1”, “Notfound=error”, LAST); TotalNumberOfBUIDs=atoi(lr_eval_string(“{AvailableBUIDs_count}”)); TotalNumberOfBUIDs = rand() %TotalNumberOfBUIDs; lr_output_message(“%d”, TotalNumberOfBUIDs); itoa(TotalNumberOfBUIDs, TotalNumberOfBUIDschar, 10); //working variable conversion lr_save_string(TotalNumberOfBUIDschar, “BUIDindex”); AvailableBUIDsparam = lr_eval_string(“{AvailableBUIDs_{BUIDindex}}”); lr_save_string(AvailableBUIDsparam, “BUIDs”); lr_save_string((lr_eval_string(lr_eval_string(“{BUIDs}”))), “BUID”); “Name=VCHR_ERRC_WRK_BUSINESS_UNIT”, “Value={BUID}”, ENDITEM, //application of the value that was captured and then randomized The […]

[

Tags: ··········