Summary
Error
Cause
This issue is to be related to the size of the ICA file that the server is sending back to LoadRunner/Vugen during the replay of the script. Vugen has a buffer limit of 5KB for the captured ICA file when using the function ctrx_nfuse_connect.
It has been confirmed that this issue is reproducible on LoadRunner 11.0X.
Fix
To capture the response with the ICA file, write it to the disc and use ctrx_set_connect_opt
- Remove the ctrx_nfuse_connect call from the script.
- Change the script to hit the Citrix portal url with a web_url call instead of a ctrx_nfuse_connect call.
- Use a web_reg_save_param to capture the full ICA file response from the Citrix portal.
- Write the ICA info out to a new ICA file.
- Use ctrx_set_connect_opt to point to the new ICA file.
- Depending on the size of the response, the function web_set_max_param_lenght needs to be added to the script with the proper value.
Review the following example code as a guide of the expected result after following the mentioned steps:
Action()
{
int fp;
char * icafile;
// ...
// ... Other recorded code removed to improve clarity of this KB
// ...
// Depending on the Citrix server, the right and left boundaries might need to be changed.
// The following function will capture everything from the server's response.
web_reg_save_param("icadata", "LB=", "RB=", LAST);
// The following is the function that will replace the recorded ctrx_nfuse_connect
web_url("launcher.aspx",
"URL=<Take the entire URL from the ctrx_nfuse_connect and use it here>",
LAST);
// code below saves the parameter data onto the local C:\ drive, as an ICA file.
icafile = (char *) malloc(strlen(lr_eval_string("{icadata}")) + 100);
sprintf(icafile, "%s", lr_eval_string("{icadata}"));
fp = fopen("C:\\\icafile.ica", "w");
fprintf(fp, icafile);
fclose(fp);
ctrx_set_connect_opt(ICAFILE, "C:\\\icafile.ica"); // this is the ICA file you captured to disk.
ctrx_wait_for_event("LOGON", CTRX_LAST);
lr_think_time(5);
// ...
// ... Citrix Business goes here.
// ...
return 0;
}