I have seen the proposed solution in this thread but I currently have a legacy DLL that expects data to exist in the app.config. The legacy DLL will not know about the ExecutionContext and since the configuration I want to put into the app.config only applies at an application level, I don't want to place it in my machine.config.
Is there some way I can modify the test studio app.config to include my desired xml nodes?
I am currently using the standalone Telerik Test Studio v 220.127.116.11
6 Answers, 1 is accepted
To achieve this, you can create a custom config file that will include the Test Studio's settings along with the desired keys from your app.config file. Here is an example of a complete app.config file that contains all of Telerik's configuration settings:
Now after the WebAii.Settings.Web section add a new section called "appSettings" and include all the keys you need from your app.config file. For example, I added a key MyTime with value 300000:
Once this is done, you can easily access the desired value by its key in a coded step like this:
Please give it a try and let me know if you need further assistance on this.
the Telerik team
1) The legacy DLL expects a particular xml node structure within the app.config
2) I am not accessing the keys within MY dll (the legacy DLL is accessing the app.config)
3) I am using standalone Test Studio (not Visual Studio plugin). How should I add the app.config in this case?
I have attached a zip containing a very basic sample of what I am attempting to do. Within the zip are:
1) A Visual Studio project containing
a) A "legacy" class library
b) A console application with an app.config that adheres to the legacy code's expectations and will run as expected
2) A telerik test studio project which has a coded step that executes the legacy code provided and fails. Even if I manually place a ProjectWithLegacyDLL.dll.config in my test studio project bin, it is failing.
Let me know if the attached zip helps clarify my problem.
Thanks for providing the sample project. The default app.config file that Test Studio uses is ArtOfTest.Runner.exe.config. This file is located in the Test Studio's Bin folder.
- C:\Program Files (x86)\Telerik\Test Studio\Bin
In order to make this to work, you can simply replace the content of our config file with the content of your app.config. See this video for a quick demonstration and let me know if you need further assistance on this.
Please keep in mind that next time you decide to upgrade Test Studio to a newer version, our installer will probably restore the default ArtOfTest.Runner.exe.config settings, so you should always keep a copy of that file stored somewhere on your machine.
the Telerik team
Is there any way I would be able to configure this per project? Although I can modify the ArtOfTest.Runner.exe.config it would apply to all of my projects (essentially the same as if I modified my machine.config). The problem with that is that I may wish to test different projects that want to use different app-level configurations.
Unfortunately there is no way to configure this per project. Our ArtOfTest runner by design can only read from single config file.