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

app.config during running of tests

3 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew Witherley
Top achievements
Rank 1
Andrew Witherley asked on 20 Feb 2013, 03:31 PM
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?






















3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 20 Feb 2013, 04:35 PM
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
0
Ryan
Top achievements
Rank 1
answered on 28 Jul 2016, 04:54 PM
The code sample link is broken.
0
Elena
Telerik team
answered on 29 Jul 2016, 01:16 PM
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
 
Tags
General Discussions
Asked by
Andrew Witherley
Top achievements
Rank 1
Answers by
Cody
Telerik team
Ryan
Top achievements
Rank 1
Elena
Telerik team
Share this question
or