This is a migrated thread and some comments may be shown as answers.

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

5 Answers 397 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 28 Jul 2017, 08:25 PM

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?

 

 

 

5 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 01 Aug 2017, 02:58 PM
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!
0
Michael
Top achievements
Rank 1
answered on 02 Aug 2017, 01:46 PM

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...

0
Michael
Top achievements
Rank 1
answered on 02 Aug 2017, 05:11 PM

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.

0
Elena
Telerik team
answered on 03 Aug 2017, 12:48 PM
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!
0
Elena
Telerik team
answered on 08 Aug 2017, 01:13 PM
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!
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Elena
Telerik team
Michael
Top achievements
Rank 1
Share this question
or