Technorati Tags:

If you are new to InfoPath scripting please go thru my previous blogs to understand the fundamentals. This blog focus more on debugging the VSTS scripts.

Does your web test playback fails even after adding necessary extraction rules? What if some requests are missing? How can we identify which requests are missing? Here again Fiddler helps us.

Each request has a post back counter (highlighted in green below) as discussed earlier. The post back counter will follow a sequence in the script, if we find there is a break we can be sure there is some request missing.

Let’s see with an example:

8;0;e8f1110f-9a7c-4c9a-8d5b-c139fd561a55;337818e1-961a-4dde-b6d9-dee88bf242bf:ver:1.0.0.4039;0;%2FDefinitionLibrary%2FWFDefinition-{{DefinitionName}}.xml;;https%3A%2F%2Ftest.com%2FFormServerTemplates%2FArtDefinition.xsn;;https%3A%2F%2Ftest.com;https%3A%2F%2Ftest.com%2FDefinitionLibrary%2FForms%2FAllItems.aspx;0;1;0;23;1;633576714887154000;;T96l+tfY4xvMXmhNhkLxP3vMr8FnMvOd+9fFJjwA0IqejPnGQBtzfW+R4wOyIoFlZsM0cUVnsuG6oXxvYMyQeg==|633576714885747485 1;btnCreateWFTemplate;V1_I1_S1_I1;

8;2;e8f1110f-9a7c-4c9a-8d5b-c139fd561a55;337818e1-961a-4dde-b6d9-dee88bf242bf:ver:1.0.0.4039;0;%2FDefinitionLibrary%2FWFDefinition-{{DefinitionName}}.xml;;https%3A%2F%2Ftest.com%2FFormServerTemplates%2FArtDefinition.xsn;;https%3A%2F%2Ftest.com;https%3A%2F%2Ftest.com%2FDefinitionLibrary%2FForms%2FAllItems.aspx;0;1;0;137;1;633576714887154000;;IqCL2kRkh37dM4cSboBgG5ujVWdGmQxI9wE5wshOG/GXZsEhaIO7ZgigrEensblSV1CMytADJYvhrnpuQwtT4Q==|633576715314960741 0;V1_I1_S1_I1_R4_I1_R1_I1_D3;;Frank

If you look at the highlighted post back counter parameters, you find the sequence is broken. We can be sure the request with the post back counter 1 is missing. If we have given appropriate comments while recording it will give us a clue as to which request is missing. So how can we go about adding the missing request to our VSTS script?

Figure 7 below shows the recorded upload script where the upload request is missing. Now we have to look into Fiddler for the request.We can copy the request from Fiddler, paste it in our VSTS script and add request parameters as form post parameters

Recorded Web test for a simple file upload

image

Upload Request added to VSTS script from fiddler request

image

Form post parameters added to upload request

image

The script will now work fine for upload.