locked
Test Automation of SharePoint using Visual Studio 2012/2013 Test Suites RRS feed

  • Question

  • Hi all,

    I've a scenario where I need to Automate the Testing of a Browser based InfoPath forms on a Office-365 site. Do we have full fledged support from the Visual Studio 2012/2013 Test Templates, for this requirement?

    I tried creating projects of the template Web-Performance Testing template, using 'Record and Run' mechanisms. I've also included the Dynamic-Parameters that were detected during the recordings of Web-Test. However, when I try to run the web-test, it fails the moment it hits the URL of the InfoPath form (NewItem form of an Infopath Library). Below is the error I receive, in the Web-Test Run Logs:

    <Site-URL>/_vti_bin/client.svc/ProcessQuery  -  403 FORBIDDEN

    I've also increased the 'Think Time' of each request, but it didn't help. Do we need to add any additional references to the project for InfoPath form testing? If so, what needs to be included here?

    Thanks


    Abhijith R Shastry

    Monday, May 12, 2014 7:26 AM

Answers

  • Hi,

    This blog below introduced how to do web performance test for SharePoint 2013 and provided a solution to resolve ‘403 Forbidden’ issue on a ProcessQuery request.

    http://blogs.technet.com/b/meamcs/archive/2013/06/16/web-performance-load-testing-sharepoint-2013-for-beginners-part-1.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+yahoo%2FZfiM+(Team+blog+of+MCS+%40+Middle+East+and+Africa)

    Quote:

    If a ProcessQuery request fails, it is because it is expecting a header (X-RequestDigest). So how do we pass this header to the request? Right click the first request in the web performance tree, Add an extraction rule to extract the form input __REQUESTDIGEST and save it in a context parameter (name it for example digest). Right click the ProcessQuery request and click add header. The header name should be X-RequestDigest and the value should be bound to the parameter context digest we created in the extraction rule.

    Hope this can help you.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Monday, May 19, 2014 1:40 AM
    • Marked as answer by Amanda Zhu Tuesday, May 20, 2014 1:11 AM
    Tuesday, May 13, 2014 6:07 AM

All replies

  • Hi,

    This blog below introduced how to do web performance test for SharePoint 2013 and provided a solution to resolve ‘403 Forbidden’ issue on a ProcessQuery request.

    http://blogs.technet.com/b/meamcs/archive/2013/06/16/web-performance-load-testing-sharepoint-2013-for-beginners-part-1.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+yahoo%2FZfiM+(Team+blog+of+MCS+%40+Middle+East+and+Africa)

    Quote:

    If a ProcessQuery request fails, it is because it is expecting a header (X-RequestDigest). So how do we pass this header to the request? Right click the first request in the web performance tree, Add an extraction rule to extract the form input __REQUESTDIGEST and save it in a context parameter (name it for example digest). Right click the ProcessQuery request and click add header. The header name should be X-RequestDigest and the value should be bound to the parameter context digest we created in the extraction rule.

    Hope this can help you.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Monday, May 19, 2014 1:40 AM
    • Marked as answer by Amanda Zhu Tuesday, May 20, 2014 1:11 AM
    Tuesday, May 13, 2014 6:07 AM
  • Hello Crystal,

    I tried with the above approach. But I'm now getting an error, after adding the Header parameter as suggested - 

    'Request failed: Context parameter 'Digest' not found in test context'

    When I Inspect the request, this is the error I could find:

    Test

    In the direction of Resolving this Issue, I deleted all the requests, performed a Log-out from O-365 site and then, did a new Recording.

    In this case the previous error was not seen regarding the 'client.svc' request. However, I'm getting a different error when the Web-Test tries to load the Browser based form -

    'Request failed: Context parameter '$HIDDEN1._wpcmWpid' not found in test context'

    Another reminder that I'm testing a browser based INFOPATH List-form in this scenario. All the fields of the form are represented as Hidden fields (as shown above) while recording and creation of the Web-Test Request Tree.

    Thanks


    Abhijith R Shastry




    Tuesday, May 13, 2014 11:14 AM
  • Hi,

    For this error: 'Request failed: Context parameter '$HIDDEN1._wpcmWpid' not found in test context', generally we resolve it through extracting the hidden filed from the corresponding request and then binding the extracted value to corresponding parameter.

    For detailed steps, please see: How to debug a Web Test

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Monday, May 19, 2014 1:40 AM
    • Marked as answer by Amanda Zhu Tuesday, May 20, 2014 1:11 AM
    • Unmarked as answer by Abhijith Shastry Wednesday, May 21, 2014 11:40 AM
    Wednesday, May 14, 2014 3:10 AM
  • Hello Crystal,

    As per the post you have mentioned, it tells about binding dynamic parameters. As per the image below, the Visual Studio-2013 Web-test has promoted the Dynamic Parameters to Web-Test parameters and the hidden fields have placeholders. (See Image Below) 

    What is understood here: All the controls of an InfoPath Browser Form are hosted by the InfoPath service on the SharePoint page. Hence, every time it loads the form, the Client-ID's are different from the previous load.

    At the end of recording a session, I receive a pop-up that asks me to convert the dynamic parameters to web-parameters, which I've done. I find no hard-coded values for the fields as shown in the above picture, since the Web-Test 2013  has possibly taken care of the binding.

    Even after all these, the Web-Test fails. I m searching in the direction of any Microsoft Extensions for InfoPath Testing in Browser forms(Supported on Office-365 sites).

    Any help in this direction would be helpful.

    Thanks


    Abhijith R Shastry

    Wednesday, May 21, 2014 11:38 AM
  • Hi,

    Because the original error:403 403 FORBIDDEN has been resolved, and now the new issue is 'Request failed: Context parameter '$HIDDEN1._wpcmWpid' not found in test context', could you please post a new thread about the new issue? In this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well.

    In addition, when you open a new thread, it is better you can provide us your web test project, in this case we can know your issue better.

    Thank you for your understanding.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 23, 2014 1:48 AM