Using the Application's .config File

7 posts, 0 answers
  1. Marta
    Marta avatar
    4 posts
    Member since:
    Mar 2015

    Posted 08 Jul 2015 Link to this post

    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

     

  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 13 Jul 2015 Link to this post

    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
     
  3. Marta
    Marta avatar
    4 posts
    Member since:
    Mar 2015

    Posted 16 Jul 2015 in reply to Ivaylo Link to this post

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

     

  4. Marta
    Marta avatar
    4 posts
    Member since:
    Mar 2015

    Posted 16 Jul 2015 in reply to Ivaylo Link to this post

    Hi,

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

    BR, Marta

  5. Marta
    Marta avatar
    4 posts
    Member since:
    Mar 2015

    Posted 16 Jul 2015 in reply to Ivaylo Link to this post

    Hi,

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

    BR, Marta

  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 21 Jul 2015 Link to this post

    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
     
  7. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 02 Jan Link to this post

    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
     
Back to Top