app.config during running of tests

4 posts, 0 answers
  1. Andrew Witherley
    Andrew Witherley avatar
    1 posts
    Member since:
    Sep 2008

    Posted 20 Feb 2013 Link to this post

    Hello,

    I am trying to integrate our automated tests created in telerik test studio with our test management software (SpiraTest) via a web service, in order to do this I have added a coded step to a test and then added an override to the OnAfterTestCompleted event as suggested in the documentation, I then intend to push out data from the TestResult object .

    The problem I am having is that to push the test information to our test management software I am using a web service, I have added the configuration settings for in the test projects app.config (see content below), however these settings are being lost during the running of the test which is causing an error message:

     "Could not find default endpoint element that references contract  in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. telerik test"

    Is there a way I can ensure these app.config settings are still applied during the running of the tests?






















  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 20 Feb 2013 Link to this post

    Hello Andrew,

    I hope you don't mind, I converted your support ticket into a public forum post so that all of our customers can benefit from the answer to your question.

    Is there a way I can ensure these app.config settings are still applied during the running of the tests?

    In short, no there isn't. The problem arises from how Test Studio dynamically loads dlls referenced by the test at run time. The dynamic loading process bypasses the normal .NET mechanism that would load the app.config for that dll.

    We wrote this code sample to demonstrate how you can overcome this limitation.

    Regards,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Ryan
    Ryan avatar
    1 posts
    Member since:
    Jun 2016

    Posted 28 Jul in reply to Cody Link to this post

    The code sample link is broken.
  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 29 Jul Link to this post

    Hello Ryan,

    The thread you are referring to is last updated more than 3 years ago and this is the reason why the link does not work anymore. Here you could find the code sample mentioned prior. Thank you! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!