We are looking to write automated tests using coded ui test framework. We are looking to test the ui components in isolation without launching the application in a separate process.
For example if we have a pop-up dialog in the application to capture data from user, we would like to launch only the specific dialog and validate different use cases rather than running the whole application.
We tried to test by launching the dialog as part of the test initialize() but it is not able to find the controls... but the same test works fine if I launch the dialog separately.
Have anyone tried this or have advise to get this working ?
Coded UI Framework is a very powerfull framework yet has lots (and I mean LOTS) of problems.
I wouldn't recommend it to do what you are trying to accomplish.
Besides, testing "components in isolation" is unit testing, and from my experience this is not a best practice for Coded UI Test at all.
Coded UI test will help you in testing cross-application processes from end to end, closest to the user as it gets since its simulating the users inputs though keystrokes and mouse clicks.
Also, as UI tends to change quite a lot during development, and Coded UI relies on that, I suggest you use it mainly for regression testing for windows you know that are not going to change anytime soon. This way you'll keep you maintainance low and productivity high.
Hope this helps.