Mar 9, 2011 at 8:13 AM
Edited Mar 9, 2011 at 8:17 AM
For our automated UI tests, we need to access the visual tree of the WPF application under test (since some 3rd party controls lack of automation support).
The InProcessApplication feature of the TestApi is great to handle this, and for a start this is a nice way to enable UI testing at all.
We would like to run the application under test from an arbitrary location.
- the test method (CodedUITest) is executed directly inside Visual Studio 2010 with debugging enabled / or automatically after a Team Build
- the test runner should just know about the root path of the application under test
- no other dependencies (like app.config or direct DLL references) should be needed
For now, our solution to this is the following approach:
- The InProcessSeparateThread mode is used to run the application under test (since InProcessSeparateThreadAndAppDomain is not supported yet)
- the app.config of the application under test is directly referenced and used as app.config of the testrunner (not nice)
- the assemblies of the application under test are loaded in AppDomain.CurrentDomain.AssemblyResolve
Are there better ways to do this? Would it be possible to enable InProcessSeparateThreadAndAppDomain meeting the described
requirements in a forthcoming release of the TestApi?
Thanks a lot for your help.