Are you facing issues while trying to record and playback InfoPath forms using VSTS web test? I would like to share some the tricks and techniques we used while conducting performance testing for our applications which used browser enabled InfoPath forms extensively.
Let’s review one of our performance scripts to understand this post back. In this below example, on click of create button, a view switching happens and results in a full postback whereas when we try changing one of the attributes in the form (such as choosing some drop down data), a partial postback happens.
Let’s look at a typical request, captured during the VSTS recording:
These looks complicated at first glance unless we go more into it and understand what each parameter corresponds to. Let’s categorize this way to simplify things:
<Parameter0> “;” <PostbackCounter> “;” <EditingSessionId> “;” <SolutionId> “;” <Parameter4> “;” <Parameter5> “;” <Parameter6> “;” <Parameter7> “;” <Parameter8> “;” <Parameter9> “;” <Parameter10> “;” <Parameter11> “;” <Parameter12> “;” <Parameter13> “;” <Parameter14> “;” <Parameter15> “;” <Parameter16> “;” <Parameter17> “;” <Canary>;<Parameter18>
When you do a playback of the above request it will fail as some of the parameters are dynamic. Now the challenge is to find which parameters are dynamic. We have a tool called Fiddler which can be used record the scenarios and compare the same with that of VSTS. Record the scenario in similar fashion using Fiddler .Try comparing same request from VSTS and fiddler
Request from VSTS:
8;0;3a2a936e-73c7-447f-9f7b-95b728068f46;b395b396-33ab-43ce-8325-3ec299f462d3:ver:126.96.36.19994;0;%2FDynamics%2FAxapta%2F2FBulk_PISite %2FInstanceu20Library%2FInstanceForm- Multi_instance12008-10-02T043732290.xml;;https%3A%2F%2Ftest.com%2FFormServerTemplates%2FArtDefn.xsn;;https%3A%2F%2Ftest.com%2FDynamics%2FAxapta%2FBulk_PISite;https%3A%2F%2Ftest.com%2FDynamics%2FAxapta%2F2FBulk_PISite %2FInstanceu20Library%2FForms%2FAllItems.aspx;0;1;0;162;1;633546595550842000;;JawjD/T9yExN3MFXdt28ubn2IyV9Sc6WJsgv4UxfyXg40EKStkMmWvFCYZBY0ZXpb0YwRV+8JGKxmTPzlFxVxw==|633546595550529792 1;btnpostIntiationUpdate;V1_I1_S1_I1;
Request from Fiddler:
8;0; dbfd9bc6-9a35-4342-9bf6-5926d9cfc565;337818e1-961a-4dde-b6d9-dee88bf242bf:ver:188.8.131.5294;0;%2FDynamics%2FAxapta%2F2FBulk_PISite %2FInstanceu20Library%2FInstanceForm-Multi_instance32008-10-16T003011850.xml;;https%3A%2F%2Ftest.com%2FFormServerTemplates%2FArtDefn.xsn;;https%3A%2F%2Ftest.com%2FDynamics%2FAxapta%2F2FBulk_PISite;https%3A%2F%2Ftest.com%2FDynamics%2FAxapta%2F2FBulk_PISite %2FInstanceu20Library%2FForms%2FAllItems.aspx;0;1;0;162;1;633546595550842000;; vFIuHMmlR+l9Oi1UOMQSwE+59BS+9v0w1b0xU2bf9TG1QkGyqjfYV3bn4xzXQLcmkiMx0WNy+VzyXmbPwc0tEA==|633564624538972226 1;btnpostIntiationUpdate;V1_I1_S1_I1;
As you can see, the highlighted sections (Editing Session id, Solution id, Canary value) differ from time to time. In simple terms, every time we record the same scenario we have different values in these places. This confirms what all the dynamic parameters are.