Performance testing Appian Scripting – Loadrunner Web Protocol

Appian based application can be easily tested using Loadrunner Web HTTP/HTML Protocol or Truclient protocol.

Truclient Protocol

Using this protocol, appian based scripts can be recorded as straight forward as any other web-based application. Only con using this protocol is, if performance requirement is for very high number of users and number of LGs are not enough. In such case web HTTP/HTML protocol can be very useful.

Web HTTP/HTML Protocol

While performing scripting for Appian applications using this protocol. Below are the things that must be considered.

  • X-APPIAN-CSRF-TOKEN must be correlated.
  • Other mandatory things that should to be correlated are: #v, uuid, _cId & saveInto
  • For #v and saveInto correlation please use web_reg_save_param_json, as it will make correlation faster and searching the big strings will be easy and accurate.
  • uuid and _cId can be correlated normally through web_reg_save_param, web_reg_save_param_ex or web_reg_save_param_json. However, as it has been already said that #v and saveInto web_reg_save_param_json should be used for correlation. You can use same for uuid and cid

#v may appear like below string in requests. Red Colored portion of the string need to be correlated {\”#v\”:\”jA0EAwMCRQuw5UGsw5UB0sArAZ1v/E1slK5oH2ZtKqOKUdlhFX/iZixSHPKNsp5rtBcMJ13Ksp5l\\r\\nhKKE4nCHrFbtmF4fvHq/0FN3Fav/ow7tHWm/wMofXyNjTq36eZaghpJGExk434YpM727OBN7S6G9\\r\\nYMyZ66WsIGe9dcx5i1P2ppgDIYCwGLZ19FXgT74w40OUWt2ZDrVpJYha+IsmoBCzbm8Q8JFL+4V0\\r\\nZKdkYGHH1WIfeXrI4Wkv7/EX5gri99J4G6t67JnQ4W4pFy79s/Km9UdT1hqtaFNyXls3ul+mgpHV\\r\\nsmA34MdGbvBwd9TMHhB8nUX6rci5b9jxkw==\\r\\n\”,\”#t\”:\”string\”}

saveInto will appear as below in requests. Red colored portion needs to be correlated. “saveInto\”:[\”<<jA0EAwMCRQuw5UGsw5UB0oUBgAE46HmPp/pIhpefcWIint8SyInxx5Tk9YqkXfnmc7qvlyx7hdmf\\r\\n2xfd+zkrVlmeL533EyMXUlBLZ9bkLZ8PN4Z4IcJAGiIzG7PN1bKxzc4hfAzXmCZsMVGDuXts42NG\\r\\ncIq7qXL15NHq2xXlz3c/N335yX0C/dJE2kHNSsWBJIHua1pq\\r\\n>>\”]

Now as you can see there is \\r\\n in the string, which is a newline character. If we pass the value directly in a request after correlation, request will fail.

We need to convert this new line as actual string. To do so, please use below function:

//Global Variables
char fString[1024];
    char *token;
    token = (char *)strtok(CorrelationString, "\r\n");        
    while (token != NULL ) {         
           strcat((char *)fString,token);
        if ((strspn(token, ">>")) == 0)
            strcat((char *)fString,"\\r\\n");
              token = NULL; 
        token = (char *)strtok(NULL, "\r\n"); 

Please note that the same function can be used for #v and saveInto variable correlations.

  • Example for calling the above-mentioned function:
stringFormation (lr_eval_string("{c_saveInto}"));
  • Now new string will be saved in “fstring” as character string. Now to convert it into Loadrunner variable using lr_save_string as below:

4 thoughts on “Performance testing Appian Scripting – Loadrunner Web Protocol

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s