Using App.Config

Ask general questions here.
KAB
Posts: 10
Joined: Mon Jan 09, 2012 1:30 pm

Using App.Config

Post by KAB » Mon Feb 04, 2013 2:11 pm

Hi

We're using app.config (which when we use it runtime gets to be <executableName>.exe.config) to transport information/variables between test recordings/user code, instead of global parameters in the test suite.
This approach works fine when running test suite run configurations, as it is then builds the Suite.exe.config, as the app.config has been copied to, and the Suite.exe can find it because it's a standard .NET feature (or so I believe at least, when using .NET 3.5 or 4.0).

My question now, is wheter there is a clever way, to use the app.config approach when running a single recording (e.g. under debug / development of recording module)?
The system compiles and runs a recording.exe and not a suite.exe, but no recording.exe.config is created, and hence all the calls to getting information from it fails, so is there a work around, where I can force it to build the recording.exe.config using the app.config info?

Cheers
KAB

PS. we pretty much use the methods explained in http://geekswithblogs.net/akraus1/articles/64871.aspx as linked in another thread, for getting/setting app.config or suite.exe.config variables.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Using App.Config

Post by Support Team » Tue Feb 05, 2013 3:03 pm

Hello KAB,

If you use the standalone recorder a "Recording.Runner.exe.config" will be created, but unfortunately it is not possible to change it. The config file is created each time you compile the recording and cannot be changed.
Sorry!

Regards,
Bernhard
.
Image

KAB
Posts: 10
Joined: Mon Jan 09, 2012 1:30 pm

Re: Using App.Config

Post by KAB » Mon Feb 11, 2013 9:00 am

Oh well, thanks for the reply. At least I won't have to consider what I could have done differently.

Maybe it could be insluded in a future release, that the app.config in the project is used when compiling the "Recording.runner.exe.config", but then again, if we're the only ones who would like it, maybe we should revise how we use it.

regards
KAB

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Using App.Config

Post by Support Team » Mon Feb 11, 2013 5:57 pm

Hello KAB,

I treat this as feature request. We will discuss this internally.

Regards,
Bernhard
.
Image