Folks, I patched my script by adding the AddDynatraceHeader to each web call but when I try to run it says its not recognized, maybe a missing library, Im running LR 11.5
thanks
Folks, I patched my script by adding the AddDynatraceHeader to each web call but when I try to run it says its not recognized, maybe a missing library, Im running LR 11.5
thanks
Did you see the doc page on Dynatrace Load Runner Integration? We have a script conversion tool which will also add that method to your header files.
I needed to add the addDynatraceHeader function in the Globals.H file, ussually this is automatically done by Dynatrace on the Patch LoadRunner script utility.
It would help if you could note the code which is failing and then check to see if a given API is included in your version of LoadRunner
I added this to globals.h file and it worked for me.
void addDynaTraceHeader(char* header){
char* headerValue;
int headerValueLength;
int vuserid, scid;
char *groupid, *timestamp;
char* vuserstring=(char*) malloc(sizeof(char) * 10);
web_save_timestamp_param("TimeStamp", LAST);
timestamp=lr_eval_string("{TimeStamp}");
lr_whoami(&vuserid, &groupid, &scid);
itoa(vuserid,vuserstring,10);
headerValueLength = strlen(header) + 4 + strlen(vuserstring) + 4 + strlen(timestamp) + 1;
headerValue = (char*) malloc(sizeof(char) * headerValueLength);
strcpy(headerValue, header);
strcat(headerValue,";VU=");
strcat(headerValue,vuserstring);
strcat(headerValue,";ID=");
strcat(headerValue,timestamp);
web_add_header("X-dynaTrace", headerValue);
free(headerValue);
free(vuserstring);
}