Table of contents for Code Snippets(HP LoadRunner)
- Code Snippets(HP LoadRunner): Randomly Selecting an Array of Values and Using That Value As A Parameter by Howard Clark
- Code Snippets(HP LoadRunner): Decrypting Passwords and Using those Values in a web_submit statement by Howard Clark
- Code Snippet(HP LoadRunner) : FILE I/O and creating dummy XMLs
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 nodes to create is a parameter. I’ll only include a slice of code in this post, the entire file should be available for download with the post. This was done to support a custom web services testing effort involving electronic medical record(EMR) transfers.Create Sync Data File
Create_Test_File(char *header_filename, char *output_filename, int merge_count, int max_merge_count)
{
int count, output,patient_record_length,result_record_length,tail_record_length;
int result_lines,num_of_result_lines;
int total = 0;
char buffer[20000];
char * buffer_manual;
long h_file_stream;
long o_file_stream;
num_of_result_lines = atoi(lr_eval_string(“{Max_Num_Result_Lines}”));
[Read more →]