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

Using the Application's .config File

4 Answers 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marta
Top achievements
Rank 1
Marta asked on 08 Jul 2015, 09:03 AM

Hi,

I'm facing the following problem atm:

I have a project with Unit Tests. I added into the project app.config file with test settings:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,
             ArtOfTest.WebAii, Version=2015.1.528.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c"/>
    <section name="WebAii.Settings.Wpf" type="ArtOfTest.WebAii.Core.Settings.WpfSettings, ArtOfTest.WebAii,
              Version=2015.1.528.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c"/>
  </configSections>
  <WebAii.Settings
    elementWaitTimeout="10001"
    xMultiMgr="false"
    unexpectedDialogAction="HandleAndFailTest"
    createLogFile="true"
    waitCheckInterval="500"
    logAnnotations="false"
    annotationMode="All"
    annotateExecution="true"
    executionDelay="0"
    queryEventLogErrorsOnExit="false"
    clientReadyTimeout="20000"
    executionTimeout="30000" >
  </WebAii.Settings>
  <WebAii.Settings.Wpf
    DefaultApplicationPath="D:\SVN\...\Client.exe">
  </WebAii.Settings.Wpf>
 
</configuration>

When I build my project, the .dll.config file is created in the project bin folder.

Then I want to get the settings in the code:

MyManager = new Manager(true);
MyManager.Start();
WpfClientApp = MyManager.LaunchNewApplication(MyManager.Settings.Wpf.DefaultApplicationPath);

The problem is that the settings are not taken from the file but they have default values.

Do you have any idea what it happens? Did I miss sth?

 

BR, Marta

 

4 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 13 Jul 2015, 08:05 AM
Hello Marta,

This should work on your end. Could you please provide the solution you are using so we can take a look what might be causing this?

Looking forward to hearing from you.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Marta
Top achievements
Rank 1
answered on 16 Jul 2015, 12:35 PM

Hi,

Please, find in the attachment the project I am using.

BR, Marta

0
Boyan Boev
Telerik team
answered on 21 Jul 2015, 11:19 AM
Hello Marta,

Have you checked this article in order to understand how to use the app.config file?

Please check that your meanwhile I will review your project.

Thank you.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Boyan Boev
Telerik team
answered on 02 Jan 2016, 11:29 AM
Hi Marta,

I am double checking whether this issue has been resolved?

Do you experience it still or can we assist with some other problem?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Marta
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Marta
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or