How to use the BaseURL when passed in through settings=*.xml

6 posts, 0 answers
  1. Michael
    Michael avatar
    5 posts
    Member since:
    May 2016

    Posted 28 Jul 2017 Link to this post

    Hello,

    How does one use the BaseURL when passed in through settings=*.xml? Or more generally - how do you use the settings=*.xml in general? I can't seem to get it to work... instead the BaseURL configured to the test list is ALWAYS used. I understand that the BaseURL in the TestList overrides the one in the settings - but if I set the BaseURL in the Test List to be empty than the tests don't navigate anywhere at all. Here's the details:

    Firstly, here is the ArtOfTest.Runner command we are executing, which passes our *.xml file:

    "C:\Program Files (x86)\Telerik\Test Studio\Bin\ArtOfTest.Runner.exe" list="C:\repos3\acs_web\ACS\TestLists\ACS_Chrome_Acceptance.aiilist" out=C:\output\ html xml settings="C:\repos3\acs_web\ACS\settingsAutomatedRun.xml"

     

    The *.xml file contains this:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <configSections>
    <section type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings"/>
    <section type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings.Web"/>
    <section type="ArtOfTest.WebAii.Core.WpfSettingsConfigSectionHandler,ArtOfTest.WebAii" name="WebAii.Settings.Wpf"/>
    </configSections>
    <WebAii.Settings.Web killBrowserProcessOnClose="false" recycleBrowser="false" baseUrl="https://auto.us.dev.trustedauthdev.com" defaultBrowser="InternetExplorer" elementWaitTimeout="10000" enableScriptLogging="true"> </WebAii.Settings.Web>
    </configuration>

     

    Also in the test code we reference the baseURL using the below line:

    string baseUrl = ActiveBrowser.Manager.Settings.Web.BaseUrl.ToString();

     

    And then navigate to that baseURL using:

    ActiveBrowser.NavigateTo(baseUrl, true);

     

    The ArtOfTest.Runner.exe command will execute without error, and I've verified that the xml file is syntactically correct. But no matter what the defaultBrowser and BaseURL are set to, they are ignored, and instead the values are always being read from the Test List. There doesn't seem to be any way to remove the Test List override. Is this a bug or am I missing something here?

     

     

     

  2. Elena
    Admin
    Elena avatar
    1126 posts

    Posted 01 Aug 2017 Link to this post

    Hello Michael,

    Thank you for sharing additional details on the encountered inconsistency, 

    The different settings you may apply are prioritized. The highest level of settings to be applied are these of a test list. This is why the additional settings file you are using is not overriding these. 

    Though what you could do to overwhelm the current scenario is to copy the test list and change its BaseURL setting to the required url. Also I would like to note you could choose the test list to be executed to different browsers using the setting ExecutingBrowser

    I hope this will be helpful to you. Please let me know if I could be further helpful. Thanks! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Michael
    Michael avatar
    5 posts
    Member since:
    May 2016

    Posted 02 Aug 2017 in reply to Elena Link to this post

    So does this mean the *.xml file only applies when you execute the ArtOfTest.Runner when you are passing in specific test names? 

    Creating a test list for each combination of settings we desire is a possible solution, but it is definitely not ideal. This means for each of  our current testlists we need to create redundant ones for every combination of Browser + URL. We have about 15 different URLs and there are 4 different browsers so this means an overhead of about 60 test lists which could be reduced to one if we could leverage the *.xml file. We hoped to create a testlist for each of our ~10 feature areas.... which means we are going to have to create about 600 test lists...

  4. Michael
    Michael avatar
    5 posts
    Member since:
    May 2016

    Posted 02 Aug 2017 in reply to Michael Link to this post

    Figured it out with the help of a coworker. Turns out the override is not enforced and we can achieve what we want by passing to Browser and BaseURL via the *.xml file. So not sure why I was informed otherwise and why the docs state this.

    As soon as I removed:

    elementWaitTimeout="10000" enableScriptLogging="true"

     

    from the *.xml file it works as expected. So we can achieve our desired functionality using a single test list for each feature. Therefore it seems there might be a bug around these particular settings. Or there was just no visible error to indicate that they are not valid.

  5. Elena
    Admin
    Elena avatar
    1126 posts

    Posted 03 Aug 2017 Link to this post

    Hello Michael,

    Thank you for sharing your observations. I will test this on my end as per the additional details and will cross check what the default behavior should be. 

    Thank you once again for the time and effort spent on the case! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  6. Elena
    Admin
    Elena avatar
    1126 posts

    Posted 08 Aug 2017 Link to this post

    Hi Michael,

    Thank you once again for your cooperation on that! 

    I created a feedback item so that it could be double checked what the priorities and expected behavior when using the settings.xml file. Please follow the item here in order to get update each time when its status is changed. 

    Thanks once again! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top