locked
How to change parameters under Querystring parameters in webtest RRS feed

  • Question

  • Hi,

    We have recorded scenario by using webPerformancetest recorder. In app we have database selection while login. DB Server name has been recorded as a variable under Querystring parameters. NOw we would like to change webtest recorder dev to UAT. We are unable to modify dbserver variable. I am changing request URLs from dev to UAT by using find and replace as both URLs are different and not able to change using Parameterize Web Servers. Some are dynamic values are there in requestes but those are storing in StringBody instead of as Form Post parameters. How to change these values.

    Please let me know if anyone come across this kind of issue.

    Thanks,

    Aparna


    Friday, January 22, 2016 1:01 PM

Answers

  • The contents of String Body fields can be modified within Visual Studio. Select the string body within the web test and then select its properties (use the context menu). The values in the properties pane can then be edited. If the required values are dynamic and held in context parameter then use the context parameter in the normal way, by enclosing it in doubled curly braces. Codeplex has a plugin that makes the editing a little easier, see (eg) http://teamtestplugins.codeplex.com/

    I find that some editing operations are easiest to perform by opening the ".webtest" file with a text editor rather than the web test editor. If you do this then be very careful, it is easy to mistype and have a file that Visual Studio cannot decode. Take a back up of the ".webtest" file before doing any changes.

    String body fields are held in an encoded format within the ".webtest" file and cannot be edited with a simple text editor. I wrote this article on how I handled string body fields on one project.  See https://www.microsoft.com/en-gb/developers/articles/week02jun14/testing-how-to-managing-web-service-requests-in-visual-studio-web-performance-tests/  ( Edited to reinsert the link. )

    Regards

    Adrian


    • Proposed as answer by Weiwei Cai Tuesday, January 26, 2016 5:25 AM
    • Marked as answer by Weiwei Cai Monday, February 1, 2016 2:31 AM
    • Edited by AdrianHHH Monday, February 1, 2016 8:15 AM Reinsert a link
    Friday, January 22, 2016 1:33 PM