Occasionally you will find that you need to create a VuGen script for a web application which changes the number of name-value pairs which are sent with a POST request. This tech tip shows you how to handle this situation by dynamically constructing a POST body.

In the example below, you can see that the web_submit_data function for the updateItemsFromSearch request (which adds items to a shopping cart) has six item IDs and six item quantities. The web_subit_data function presents the name-value pairs of the POST request in an easy to read format, but doesn’t give too many clues as to how you might handle the case of submitting a varying numbers of item IDs, without writing an if statement and having separate web_submit_data functions for every possible number of items.

Fortunately, there is an easy way to do this. Read on…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
web_submit_data("updateItemsFromSearch.do", 
	"Action=http://www.example.com.au/catalog/updateItemsFromSearch.do", 
	"Method=POST", 
	"TargetFrame=", 
	"RecContentType=text/html", 
	"Referer=http://www.example.com.au/catalog/search.do?key=0/46EF7F373045033002000000AC193D36", 
	"Snapshot=t10.inf", 
	"Mode=HTML", 
	ITEMDATA, 
	"Name=sortOption", "Value=PRICE_ASCENDING", ENDITEM, 
	"Name=pageselect", "Value=10", ENDITEM, 
	"Name=page", "Value=", ENDITEM, 
	"Name=itemPageSize", "Value=10", ENDITEM, 
	"Name=next", "Value=addToBasket", ENDITEM, 
	"Name=itemkey", "Value=46EF7F373045033002000000AC193D364785F195AFD7401600000000AC193D51", ENDITEM, 
	"Name=order", "Value=", ENDITEM, 
	"Name=itemquantity", "Value=1", ENDITEM, 
	"Name=isExtendedResult", "Value=null", ENDITEM, 
	"Name=display_scenario", "Value=products", ENDITEM, 
	"Name=contractkey", "Value=", ENDITEM, 
	"Name=contractitemkey", "Value=", ENDITEM, 
	"Name=item[0].itemID", "Value=46EF7F373045033002000000AC193D364785F195AFD7401600000000AC193D51", ENDITEM, 
	"Name=item[0].quantity", "Value=1", ENDITEM, 
	"Name=item[1].itemID", "Value=46EF7F373045033002000000AC193D3640EBE620771F00A500000000AC193D52", ENDITEM, 
	"Name=item[1].quantity", "Value=1", ENDITEM, 
	"Name=item[2].itemID", "Value=46EF7F373045033002000000AC193D363F4191CB824400F3E1000000AC193D38", ENDITEM, 
	"Name=item[2].quantity", "Value=1", ENDITEM, 
	"Name=item[3].itemID", "Value=46EF7F373045033002000000AC193D36464DB497A33B005602000000AC193D51", ENDITEM, 
	"Name=item[3].quantity", "Value=1", ENDITEM, 
	"Name=item[4].itemID", "Value=46EF7F373045033002000000AC193D36484A7C7E995A8034E1008000AC193D51", ENDITEM, 
	"Name=item[4].quantity", "Value=1", ENDITEM, 
	"Name=item[5].itemID", "Value=46EF7F373045033002000000AC193D36484E990F2564C27EE1008000AC193D35", ENDITEM, 
	"Name=item[5].quantity", "Value=1", ENDITEM, 
	LAST);

First, let’s take a look at what VuGen actually sends to the web server…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
POST /catalog/updateItemsFromSearch.do HTTP/1.1\r\n
Content-Type: application/x-www-form-urlencoded\r\n
Cache-Control: no-cache\r\n
Referer: http://www.example.com.au/catalog/search.do?key=0/46EF7F373045033002000000AC193D36\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)\r\n
Accept-Encoding: gzip, deflate\r\n
Accept-Language: en-us\r\n
Accept: */*\r\n
Connection: Keep-Alive\r\n
Host: www.example.com.au\r\n
Cookie: JSESSIONID=(J2EE5934700)ID1010337953DB11208117568232223992End; saplb_*=(J2EE5934700)5934753\r\n
Content-Length: 896\r\n
\r\n
sortOption=PRICE_ASCENDING&pageselect=10&page=&itemPageSize=10&next=addToBasket&itemkey=46
EF7F373045033002000000AC193D364785F195AFD7401600000000AC193D51&order=&itemquantity=1&isExt
endedResult=null&display_scenario=products&contractkey=&contractitemkey=&item%5B0%5D.itemI
D=46EF7F373045033002000000AC193D364785F195AFD7401600000000AC193D51&item%5B0%5D.quantity=1&
item%5B1%5D.itemID=46EF7F373045033002000000AC193D3640EBE620771F00A500000000AC193D52&item%5
B1%5D.quantity=1&item%5B2%5D.itemID=46EF7F373045033002000000AC193D363F4191CB824400F3E10000
00AC193D38&item%5B2%5D.quantity=1&item%5B3%5D.itemID=46EF7F373045033002000000AC193D36464DB
497A33B005602000000AC193D51&item%5B3%5D.quantity=1&item%5B4%5D.itemID=46EF7F37304503300200
0000AC193D36484A7C7E995A8034E1008000AC193D51&item%5B4%5D.quantity=1&item%5B5%5D.itemID=46
EF7F373045033002000000AC193D36484E990F2564C27EE1008000AC193D35&item%5B5%5D.quantity=1

As you can see, the name-value pairs that were so easy to read in the web_submit_data function are really just sent as a big blob of text, with each name-value pair separated by an ampersand (&) and some characters URL-encoded (e.g. “[” becomes “%5B”).

We can make our VuGen script look more like the actual HTTP request by regenerating the script with web_custom_request selected. Select Tools > Regenerate Script, then select the recording option of URL-based script. Under URL Advanced, select Use web_custom_request only.

You script will now look something like this…

1
2
3
4
5
6
7
8
9
10
11
web_custom_request("updateItemsFromSearch.do", 
	"URL=http://www.example.com.au/catalog/updateItemsFromSearch.do", 
	"Method=POST", 
	"Resource=0", 
	"RecContentType=text/html", 
	"Referer=http://www.example.com.au/catalog/search.do?key=0/46EF7F373045033002000000AC193D36", 
	"Snapshot=t207.inf", 
	"Mode=HTTP", 
	"Body=sortOption=PRICE_ASCENDING&pageselect=10&page=&itemPageSize=10&next=addToBasket&itemkey=46EF7F373045033002000000AC193D364785F195AFD7401600000000AC193D51&order=&itemquantity=1&isExtendedResult=null&display_scenario=products&contractkey=&contractitemkey=&item%5B0%5D.itemID=46EF7F373045033002000000AC193D364785F195AFD7401600000000AC193D51&item%5B0%5D.quantity=1&item%5B1%5D.itemID=46EF7F373045033002000000AC193D3640EBE620771F00A500000000AC193D52&item%5B1%5D.quantity=1&item%5B2%5D.itemID="
	"46EF7F373045033002000000AC193D363F4191CB824400F3E1000000AC193D38&item%5B2%5D.quantity=1&item%5B3%5D.itemID=46EF7F373045033002000000AC193D36464DB497A33B005602000000AC193D51&item%5B3%5D.quantity=1&item%5B4%5D.itemID=46EF7F373045033002000000AC193D36484A7C7E995A8034E1008000AC193D51&item%5B4%5D.quantity=1&item%5B5%5D.itemID=46EF7F373045033002000000AC193D36484E990F2564C27EE1008000AC193D35&item%5B5%5D.quantity=1", 
	LAST);

The next step is to dynamically construct the string that will be sent as the body argument of the web_custom_request function. Do this by

  • Correlate your values using ORD=All (line 4) from the response to your search request (line 15).
  • Write a for loop to build a parameter containing your POST body (line 31). Save time by using lr_paramarr functions to extract the values from the parameter array you created with web_reg_save_param(“Ord=All”, …).
  • Use web_custom_request to send your POST body.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
lr_start_transaction("search for product");
 
// Save all item IDs returned by product search
web_reg_save_param("ItemID_array",
	"LB=<a href=\"javascript:seeSingleItem('",
	"RB='",
	"Ord=All",
	"Search=Body",
	"RelFrameId=1",
	"IgnoreRedirections=Yes",
	LAST);
 
web_reg_find("Text=Search Results for {SearchTerm}", LAST);
 
web_url("Search", 
	"URL=http://www.example.com.au/catalog/search.do?key={SearchTerm}", 
	"TargetFrame=center2", 
	"Resource=0", 
	"RecContentType=text/html", 
	"Referer=http://www.example.com.au/", 
	"Snapshot=t8.inf", 
	"Mode=HTML", 
	LAST);
 
lr_end_transaction("search for product",LR_AUTO);
	lr_think_time(5);
lr_start_transaction("add to basket");
 
// Construct variable length POST body.
lr_save_string(lr_eval_string("sortOption=PRICE_ASCENDING&pageselect=10&page=&itemPageSize=10&next=addToBasket&itemkey={ItemIDarray_1}&order=&itemquantity=1&isExtendedResult=null&display_scenario=products&contractkey=&contractitemkey="), "Body");
for (i=0; i<lr_paramarr_len("ItemIDarray"); i++) {
	lr_save_string(lr_paramarr_idx("ItemIDarray", i+1), "ItemID");
	lr_save_int(i, "ItemIndex");
	lr_save_string(lr_eval_string("{Body}&item%5B{ItemIndex}%5D.itemID={ItemID}&item%5B{ItemIndex}%5D.quantity=1"), "Body");
}
 
web_reg_find("Text=Mini Shopping Basket", LAST);
 
web_custom_request("updateItemsFromSearch.do", 
	"URL=http://www.example.com.au/catalog/updateItemsFromSearch.do", 
	"Method=POST", 
	"Resource=0", 
	"RecContentType=text/html", 
	"Referer=http://www.example.com.au/catalog/search.do?key={SearchTerm}", 
	"Snapshot=t207.inf", 
	"Mode=HTTP", 
	"Body={Body}",  // use dynamically constructed POST body.
	LAST);
 
lr_end_transaction("add to basket",LR_AUTO);

This is a useful technique to add to your repertoire.

24 comments on “How to handle HTTP POSTs with a changing number of name-value pairs

  1. I m trying to build dynamic post body .Below is the code which I ve written in my script. But everytime only the last value is getting printed in the body parameter variable.In the below request body I ‘ve 5 singleselectcheck box.(ex: temp:r1:1:t1:3:singleSelectCheckBox).These selectcheckboxes will vary based on the results displayed by the selection criteria. (value 3 is correlated by the below correlation function).

    web_reg_save_param(“cCheckboxID”,”LB=name=\”temp:r1:1:t1:”,”RB=:singleSelectCheckBox\” class=\”xqe\””,”ORD=ALL”,LAST);

    for (i=1;i<=lr_paramarr_len("cCheckboxID");i++)
    {
    x=lr_paramarr_idx("cCheckboxID",i);
    lr_save_string(x,"checkboxNum");
    lr_save_string(lr_eval_string("&temp:r1:1:t1:{checkboxNum}:singleSelectCheckBox=t&"),"body")
    }
    But the body is saving only 1 value every time I run the script.Only the last value is saved in the body. I need to append all the values to the body .How can I achieve this?

    Below is the dynamic request which will have multpile singleSelectCheckBoxes. I need to make this as a parameter.

    Even tried of printing all the values to a file. but even then only the last value is getting printed to the file.

    "Body=temp:r1:1:cmbAdminSponsorAssignDoc=0&temp:r1:1:ad_soc2AssignDoc=0&temp:r1:1:soc7=1&temp:r1:1:soc8=0&temp:r1:1:soc1=0&temp:r1:1:soc2=1&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c2=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c12=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c3=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c4=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c5=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c6=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c13=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c14=&_afrFiltertemp_afr_r1_afr_1_afr_t1_afr_c15=&temp:r1:1:t1:soc6=2&temp:r1:1:t1:selectAllCheckBox=t&temp:r1:1:t1:1:singleSelectCheckBox=t&temp:r1:1:t1:2:singleSelectCheckBox=t&temp:r1:1:t1:3:singleSelectCheckBox=t&temp:r1:1:t1:4:singleSelectCheckBox=t&temp:r1:1:t1:5:singleSelectCheckBox=t&temp:r1:1:sor1=0&temp:r1:1:soc4=7&temp:r1:1:soc5=0&temp:r1:1:id1=31-Mar-2017

    1. Hi Vamshi,

      The above code is replacing the body param with your string over and over – but you want to append, not replace.

      Try the following:

      web_reg_save_param(“cCheckboxID”,”LB=name=\”temp:r1:1:t1:”,”RB=:singleSelectCheckBox\” class=\”xqe\””,”ORD=ALL”,LAST);

      lr_save_string("","body"); // Remove any data from previous iterations
      for (i=1;i<=lr_paramarr_len("cCheckboxID");i++)
      {
      x=lr_paramarr_idx("cCheckboxID",i);
      lr_save_string(x,"checkboxNum");
      //Include the body parameter so we are appending, not replacing:
      lr_save_string(lr_eval_string("{body}&temp:r1:1:t1:{checkboxNum}:singleSelectCheckBox=t&"),"body")
      }

  2. could you explain how to create for loop in same iteration with different load distribution of transaction?
    Example i want to create 5 transactions with different values (like 15%.25%,10%.20%,30) in one iteration ?

  3. Very nice Example to follow. Thank you Stuart Moncrieff

    My code is as follows,
    int i;
    char *thisValue;
    char totalValue[200];

    web_reg_save_param_ex(“ParamName=msgId”, “LB=msgId\”:”, “RB=,\”time”,”NotFound=warning”,”Ordinal=All”, LAST);
    web_custom_request(………….);

    for(i=1; i<= lr_paramarr_len("msgId") ; i++){
    thisValue = lr_paramarr_idx("msgId", i);
    strcat(totalValue,thisValue);
    strcat(totalValue,","); // in order to make form like this: 123, 234, 345, 456, …

    web_custom_request("DeleteMessages",
    "URL=https://URL……………/inbox?msgids={PARAM}"
    ,LAST );

  4. Please help me on this:

    I am practising the dynamic handling custom request. Please help me to build the dynamic request mentioned below:

    1.
    web_custom_request(“accessorieslisting.htm”,
    “URL=http://www.khivrajmotors.com/accessorieslisting.htm”,
    “Method=POST”,
    “Resource=0”,
    “RecContentType=text/html”,
    “Referer=http://www.khivrajmotors.com/accessories.htm”,
    “Snapshot=t96.inf”,
    “Mode=HTTP”,
    “Body=acc_model={pModel}&acc_variant={pVariant}&fieldChanged=&accessoriesCount={dAccCount}&accessSelected=Gear+Lock+Kit@@+Steering+Cover@@+&accessAmountWODiscount=2000&accessDisAmount=0&finalAccessAmtWithDiscount=2000&accessAmount_1=1490.0&discountAmount_1=0.0%25%3E&finalAccessAmount_1=1490.0&accessories_1=Gear+Lock+Kit&accessAmount_2=510.0&discountAmount_2=0.0%25%3E&finalAccessAmount_2=510.0&accessories_2=Steering+Cover”,
    LAST);

    2.

    web_custom_request(“accessorieslisting.htm”,
    “URL=http://www.khivrajmotors.com/accessorieslisting.htm”,
    “Method=POST”,
    “Resource=0”,
    “RecContentType=text/html”,
    “Referer=http://www.khivrajmotors.com/accessories.htm”,
    “Snapshot=t97.inf”,
    “Mode=HTTP”,
    “Body=acc_model=540&acc_variant=3091&fieldChanged=&accessoriesCount=4&accessSelected=Body+Graphics@@+Side+Moulding+%28Beeding%29@@+Steering+Cover@@+Styling+Kit@@+&accessAmountWODiscount=27140&accessDisAmount=0&finalAccessAmtWithDiscount=27140&accessAmount_1=2250.0&discountAmount_1=0.0%25%3E&finalAccessAmount_1=2250.0&accessories_1=Body+Graphics&accessAmount_2=1390.0&discountAmount_2=0.0%25%3E&finalAccessAmount_2=1390.0&accessories_2=Side+Moulding+%28Beeding%29&accessAmount_3=510.0&discountAmount_3=”
    “0.0%25%3E&finalAccessAmount_3=510.0&accessories_3=Steering+Cover&accessAmount_4=22990.0&discountAmount_4=0.0%25%3E&finalAccessAmount_4=22990.0&accessories_4=Styling+Kit”,
    LAST);

    From the above mentioned, I have got two different body request. Please advice on how to customize the request for the third body dynamically changing. thanks in advance.

  5. My queries is

    web_request_form ,in ITEMDATA section the name is dynamic and keep on changing …based on deleting /adding employee and last employee willl get value which I captured through co-relation.

    After looking above example ,it has solved my half problem ,but I am not able to resolve the remaining half of the problem

    I am using function last_count and wants to assign last_count value to last employee name.

    “Name=SUNIL”, “Value=”, ENDITEM,
    “Name=RAJIV”, “Value=”, ENDITEM,
    “Name=SURYA”, “Value=”, ENDITEM,
    “Name=ANIL”, “Value=15”, ENDITEM,

    Any help,most welcome.

    Regards

    Sunil Dangwal

    1. Adding to above ,I had added script alongwith execution to show ,what exactly is expected:& How I am trying to handle using WEB_CUSTOM_REQUEST

      for (i=0;i<lr_paramarr_len("Name");i++)
      {
      lr_save_string(lr_paramarr_idx("Name",i+1),"NameID");
      lr_save_int(i,"NameID");
      sprintf(Seq_count,"{Name_%d}",i+1 );
      lr_save_string(lr_eval_string(Seq_count),"Name_value");
      lr_save_string(lr_eval_string("{Body}="),"Body");
      }

      sprintf(Last_count,"{Name_%d}",atoi(lr_eval_string("{Name_count}")));
      lr_save_string(lr_eval_string("{Body}={NewcasesValue}"),"Body1");
      lr_output_message("The total processor name is %s",lr_eval_string("{Body}"));

      Output/RESULT what is am getting after execution is as follow:

      Allocation_Processwise.c(160): Notify: Saving Parameter "Body1 = proces_mnalloc:_id102=Allocate&ABHIJEET SHARMA [X1235]_X1235_EMPCASE=&ABHIJEET MORE [X1795]_X1795_EMPCASE=&ABHIJIT APTE [E5747]_E5747_EMPCASE=&ABHIJIT NATH [E5819]_E5819_EMPCASE=&ABHIJIT DONGRE [E5862]_E5862_EMPCASE=&ABHIJIT INGALE [E7162]_E7162_EMPCASE=&JEEDULA KRISHNA [N27]_N27_EMPCASE=&KRISHNA TEST [U5819]_U5819_EMPCASE=&RAJIV VENUGOPAL [E1944]_E1944_EMPCASE=&RAJIV VENUGOPAL [N17]_N17_EMPCASE=&RATNA KISHORE [N116]_N116_EMPCASE=&TEST TESTING [U5822]_U5822_EMPCASE=&TEST TESTING [U5822]_U5822_EMPCASE=19".

      What is required ,I need to handle
      TEST TESTING [U5822]_U5822_EMPCASE= as it should not be displayed in the list ,but should be displayed
      TEST TESTING [U5822]_U5822_EMPCASE=19".

      As it is repeating twice ,because I am inserting value in last Name.

      For me result should be as follow

      Allocation_Processwise.c(160): Notify: Saving Parameter "Body1 = proces_mnalloc:_id102=Allocate&ABHIJEET SHARMA [X1235]_X1235_EMPCASE=&ABHIJEET MORE [X1795]_X1795_EMPCASE=&ABHIJIT APTE [E5747]_E5747_EMPCASE=&ABHIJIT NATH [E5819]_E5819_EMPCASE=&ABHIJIT DONGRE [E5862]_E5862_EMPCASE=&ABHIJIT INGALE [E7162]_E7162_EMPCASE=&JEEDULA KRISHNA [N27]_N27_EMPCASE=&KRISHNA TEST [U5819]_U5819_EMPCASE=&RAJIV VENUGOPAL [E1944]_E1944_EMPCASE=&RAJIV VENUGOPAL [N17]_N17_EMPCASE=&RATNA KISHORE [N116]_N116_EMPCASE=&TEST TESTING [U5822]_U5822_EMPCASE=19".

      Do let me know ,how can I tweak my code? to get required output

      Regards

      Sunil S Dangwal

      1. Thanks for your help ,I am able to get the answer,by tweaking code:

        for (i=0;i&lt;lr_paramarr_len(&quot;Name&quot;);i++)
        {
            lr_save_string(lr_paramarr_idx(&quot;Name&quot;,i+1),&quot;NameID&quot;);
            lr_save_int(i,&quot;NameID&quot;);
            sprintf(Seq_count,&quot;{Name_%d}&quot;,i+1 );
            lr_save_string(lr_eval_string(Seq_count),&quot;Name_value&quot;);
            lr_save_string(lr_eval_string(&quot;{Body}=&quot;),&quot;Body&quot;);
        }
         
        sprintf(Last_count,&quot;{Name_%d}&quot;,atoi(lr_eval_string(&quot;{Name_count}&quot;)));
        lr_save_string(lr_eval_string(&quot;{Body}{NewcasesValue}&quot;),&quot;Body1&quot;);

        Output Result :

        Notify: Parameter Substitution: parameter "Body1" = "proces_mnalloc:_id102=Allocate&ABHIJEET SHARMA [X1235]_X1235_EMPCASE=&ABHIJEET MORE [X1795]_X1795_EMPCASE=&ABHIJIT APTE [E5747]_E5747_EMPCASE=&ABHIJIT NATH [E5819]_E5819_EMPCASE=&ABHIJIT DONGRE [E5862]_E5862_EMPCASE=&ABHIJIT INGALE [E7162]_E7162_EMPCASE=&JEEDULA KRISHNA [N27]_N27_EMPCASE=&KRISHNA TEST [U5819]_U5819_EMPCASE=&RAJIV VENUGOPAL [E1944]_E1944_EMPCASE=&RAJIV VENUGOPAL [N17]_N17_EMPCASE=&RATNA KISHORE [N116]_N116_EMPCASE=&TEST TESTING [U5822]_U5822_EMPCASE=19"

  6. Hey! Good post indeed! I have just been writing a code for this for the last few minutes.. lamenting my lack of touch with C language, when I happened to see this!

    Very helpful. Thanks for the post!

    SAMEER RAJIWMALE
    Performance Engineer,
    CTS.

  7. Hi,

    Extremly good post. Helped me a lot in building a successful WEB CUSTOM REQUEST. My script is working nicely..:)..cheers :)

  8. Hi ,

    I need help to make URL dynamic which is get to next page.
    Details scenario,
    1. Have 3 pages.
    1st page to 2nd page request occur.
    In 2nd page after click on ok button, 1 parameter generated by application, which could not be in any HTML page.
    After that that request get by GET method in third page.

    So I have to capture that dynamic value generated by application, how can I do that?

  9. What is the quantity value change.
    right now all item ID has quantity 1.
    what if that value is dynamically change

  10. Hi,
    Thanks for the very useful tip.

    One note: “Save time by using lr_paramarr functions to extract the values from the parameter array you created with web_reg_find.” likely should end with “… you created with web_reg_save_param(“ItemID_array…” ?

  11. Scott’s solution is quick n dirty work around and does not scale beyond a predefined limit. I’ve been using web_custom_request for generating dynamic name-value pairs and is a very elegant solution.

    The code above would be complete if you add “convert=HTML_TO_URL” argument to the web_reg_save_param call that builds ItemID_array, so that the reserved characters like &, ?, @ etc. within the captured values (if any) will be converted to percent encoding.

  12. Hi,
    Thanks this is a great topic. I have been trying to find a way to get this done without having to change the arguments in the web_submit_data functions whenever the project team asks to change the number of name-value pairs that they want me to run the test with.

    Btw, I would like to ask if the lr_paramarr_idx and lr_paramarr_len is a function found in higher LR versions. I have tried looking for it in LR8.1 function library but these functions do not exist. Is there a work-around for this without having to use C string functions? Thanks!

    [Stuart’s Reply: Yes, the lr_paramarr functions are fairly recent. They are definitely not in LoadRunner 8.1.4.]

Leave a Reply