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

Configuring default application path

13 Answers 234 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Swathi
Top achievements
Rank 1
Swathi asked on 09 Mar 2015, 06:44 PM
Hi

I am testing a Wpf application. I would like to configure the application path while running from command prompt. This needs to override the one that give in the tool while recording test steps.
I have tried including the following in the app.config

<configSections>
    <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Web" type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler, ArtOfTest.WebAii" />
<section name="WebAii.Settings.Wpf" type="ArtOfTest.WebAii.Core.Settings.WpfSettings, ArtOfTest.WebAii" />
  </configSections>
 
<WebAii.Settings.Wpf "DefaultWPFApplication":"<path.exe">
    />


I have also tried creating a Settings.xml. But neither work. Can you provide the correct method & syntax? Thanks!

13 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 09 Mar 2015, 08:16 PM
Hello Swathi,

First your app.config is not properly formatted. Here's the correct structure:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Web" type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Wpf" type="ArtOfTest.WebAii.Core.Settings.WpfSettings, ArtOfTest.WebAii" />
 </configSections>
   <WebAii.Settings.Wpf DefaultApplicationPath="path.exe" />
</configuration>


Next make sure the test is configured to use the default path as shown in the attached screen shot. Otherwise the test will simply ignore the default path setting.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Swathi
Top achievements
Rank 1
answered on 10 Mar 2015, 03:15 PM
Hello 

These settings on app.config doesn't make any change. Basically I want to be able to change application path outside of the tool. For this I have a few more blocks.

I noticed that the settings.aiis in the project folder has the DefaultWPFApplication that can be changed outside of the tool.
So I would like to see
1) Can the test be configured to use the default path through command line ?
2) Also, I have similar issues to this (http://www.telerik.com/forums/artoftest-runner-exe-settings-command-line-option). Has there been any updates on this?

0
Cody
Telerik team
answered on 10 Mar 2015, 04:54 PM
Hello Swathi,

Instead of trying to use an app.config file (because it doesn't work the way you think it should), I recommend you use our command line runner and the settings= command line parameter. I'm sorry, I thouight you already knew about this command line parameter and were using it.

No, please do not try to modify the settings.aiis file. It's format is proprietary and subject to change at any time w/o notice. If we change it, anything you do with it will break.

Regarding http://www.telerik.com/forums/artoftest-runner-exe-settings-command-line-option, well, the misspelling has been corrected. I don't know what else we can do here. Our online documentation for that command line runner does point you to the page that documents the format and contents of the settings file.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Swathi
Top achievements
Rank 1
answered on 10 Mar 2015, 05:00 PM
Hi Cody

I still don't understand what should be the format of Settings.xml. I don't see a sample code any where.

All I want is to override the DefaultWPFApplicationpath in some file and pass it as a parameter when i run the ArtOfTest.Runner from command line.
0
Cody
Telerik team
answered on 10 Mar 2015, 06:39 PM
Hi Swathi,

The example I already sent you on 09-Mar-2015 is exactly what should go in your settings.xml file. Here it is again for your reference:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Web" type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Wpf" type="ArtOfTest.WebAii.Core.Settings.WpfSettings, ArtOfTest.WebAii" />
 </configSections>
   <WebAii.Settings.Wpf DefaultApplicationPath="path.exe" />
</configuration>

The syntax is documented here. It's just like an app.config file.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Swathi
Top achievements
Rank 1
answered on 10 Mar 2015, 07:15 PM
Hello Cody

This settings.xml is unable to override the one mentioned in Settings.aiis. Please let me know if the syntax is infact correct. The syntax in Settings.aiis looks very different. That is a Json and I feel this has to be coded in Json too. Please let me know. Thanks!

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Web" type="ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler, ArtOfTest.WebAii" />
    <section name="WebAii.Settings.Wpf" type="ArtOfTest.WebAii.Core.Settings.WpfSettings, ArtOfTest.WebAii" />
 </configSections>
   <WebAii.Settings.Wpf "DefaultWPFApplication": "" />
</configuration>
0
Cody
Telerik team
answered on 12 Mar 2015, 02:35 PM
Hi Swathi,

I must admit I'm having trouble getting it to work as expected here as well. I have filed this problem report and escalated this issue with our development team. I will let you know when I hear back from them after they've had a chance to investigate what's going on.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Swathi
Top achievements
Rank 1
answered on 12 Mar 2015, 03:35 PM
Hello Cody

Thanks for escalating the issue.
Also, I don't see a way to override defaultWFPapplication path for test lists. (even from settings.aiis)...This is quite troublesome too.

Thanks!
0
Cody
Telerik team
answered on 12 Mar 2015, 08:56 PM
Hi Swathi,

No we don't provide any command line mechanism for overriding the DefaultApplicationPath setting contained in the test list settings.

However one of my QA testers suggested that you implement a Execution Extension. In there you can write your own code to set the DefaultApplicationPath before the test starts. You can set it using code like this:

        public void OnBeforeTestStarted(ExecutionContext executionContext, ArtOfTest.WebAii.Design.ProjectModel.Test test)
        {
            test.WpfAppPath = @"c:\myfolder\myapp.exe";
        }

You can extend this to implement code that would read the value from a config file and then set the property from that config file.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Swathi
Top achievements
Rank 1
answered on 12 Mar 2015, 09:06 PM
Thanks Cody, 

Also could you help me figure this out.
Since .vsmdi is deprecated in VS 13, how do you run tests lists there?
I would like to run my test studio test lists on vs.

Do let me know.
Thanks!
0
Cody
Telerik team
answered on 13 Mar 2015, 04:46 PM
Hello Swathi,

A couple of things:

1) Test Studio test lists are not the same thing as Visual Studio test lists. You cannot run one type in the other environment. They are mutually exclusive.

2) Visual Studio test lists have been completely deprecated and there is no way of running them in VS 2013. They have been replaced by the concept of "Test Categories". Unfortunately Test Studio is not currently compatible with these new Test Categories.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Rory
Top achievements
Rank 1
answered on 13 May 2015, 08:27 PM

Hi Cody -

We implemented IExecutionExtension and placed it in the bin\Plugins dir as instructed by the docs. I enabled TestStudio trace logging, and according to the log, the extension loads and is reflected during TestStudio launch and loading of a test list.

However, the application is launched apparently before the plugin is inspected for the IExecutionExtension, and fails since we're never able to set it to what we need.

I've attached a screenshot of the code we are using.

Are we missing something? 

 

0
Cody
Telerik team
answered on 15 May 2015, 03:43 PM
Hello Rory,

You're absolute right it does work that way! It has to in order to work with subtests and multiple iterations of a data driven test.

But I have some good news. Today we released a new internal build and one of the new features added is the ability to set the WPF application path via a configuration file. You can do this in the settings file when running from the command line as documented here.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Swathi
Top achievements
Rank 1
Answers by
Cody
Telerik team
Swathi
Top achievements
Rank 1
Swathi
Top achievements
Rank 1
Rory
Top achievements
Rank 1
Share this question
or