In my previous blog, we saw the methods to identify the dynamic parameters in an InfoPath form’s response. Now lets understand how to parameterize them using appropriate extraction rules

Every response becomes the input for every subsequent request. So, in order to get the value for dynamic parameters we need to extract the same from the previous response. Let’s take a simple example and analyze further.Let’s pick the following request from VSTS  and parameterize it:

8;0;1893c270-9550-46bf-9599-89b18f493678;02490e79-9ee0-4319-a860-d96c965b2ddb:ver:;0;;urn%3Aschemas-microsoft-com%3Aoffice%3Ainfopath%3ATaskFormV1-3%3A-myXSD-2007-07-02T05-38-11;;;;;1;0;0;162;1;633614592099519000;;uQQHHhbr8PDmvX7aDrE8fpll0JlVZHTW3og3Yp3cK5oZrYjuRFjCP1U77zafB+6Jd60wKIfoUiXJ8+qaR8iODA==|633614592096706480 0;V1_I1_D15;;Handoff%20incomplete%2FFiles%20Missing%3An 0;V1_I1_D15;;Final%20PDF%20Review%20Completed%20-%20Approved%20for%20Release%3Ay 0;V1_I1_S17_I1_C1;;true 1;CTRL14_5;V1_I1;

Let’s parameterize the first dynamic parameter i.e. editing session id (1893c270-9550-46bf-9599-89b18f493678).

Here is where Fiddler gives us a hand. Let’s try searching for this parameter from the previous responses (Figure 3), examining only in headers and body. We get the matching response carrying the Editing Session ID highlighted in green.

 Extracting the editing session id from response using appropriate filters


Having found the session id, we need to extract it using extraction text rule in VSTS. So create a context parameter called “value1” in VSTS with the following extraction rule:

Starts with= -1,false,false]],false],-1,false,false]],false,[0,0]],-1,false,false],0,

Ends with=

Refer to the above figure for more information.

Adding Context parameter to the web test


Similarly we need to parameterize all dynamic parameters in every request. The typical parameterized request looks like:

8;0;{{value1}};{{value2}};0;;urn%3Aschemas-microsoft-com%3Aoffice%3Ainfopath%3ATaskForm%3A-myXSD-2008-01-04T05-38-11;;;{{SiteName}};;1;0;0;162;1;633421601380894000;;{{value3}} 0;V1_I1_D15;;{{Approval Status}} 0;V1_I1_S17_I1_C1;;true 0;V1_I1_T23;0;Dloaded%20a%20doc 1;CTRL14_5;V1_I1;