switching which host a set of API tests run against

2 posts, 0 answers
  1. Ed
    Ed avatar
    4 posts
    Member since:
    May 2017

    Posted 03 Aug 2017 Link to this post

    What is the best way to do this?


    We can't easily edit an existing test case in the UI (you can look at the baseline but AFAIK you can't edit it without either hacking the file or executing/re-composing/adding back to API test list.

    And even if we could edit them directly, I want to simply switch the host for all the Uris selected for the arrSess[ ] session list.

    How do I choose theHost in a dynamic, UI-prompted way? All I have been able to do is a know in custom rules I can do something like this:


    BeforeTestList(arrSess: Session[]): boolean
        // How do I choose theHost from a popup/form of choices? All I figured out is a simple message box, nothing rich:

        MessageBox.Show("Run Tests" + arrSess.Length.ToString() + " tests.", "BeforeTestList", );

        for (var i: int=0; i<arrSess.Length; i++)
            arrSess[i].host = theHost;


    Let's say I want to pick it from a short dropdown or radio button list.

    I tried using a Windows Form but it seems that the context under which jscript.net executes in Fiddler is somewhat protected and it doesn't seem to want to let me use those classes.


    Can someone post a small example of how you would dynamically choose the host to run your list of sessions against when you do 'Run selected tests' in the API test tab?

  2. Alexander
    Alexander avatar
    383 posts

    Posted 08 Aug 2017 Link to this post


    You can create a standard Form class, containing the controls you want and then show it in the BeforeTestList method. Keep in mind that you can use both JScript.NET and C#.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top