Hi I am looking at using Coded UI Tests (CUIT) to test an application. I have tried the recording option and this is not flexible enough for me. If you use it on a different size screen it breaks.
I know you can hand code the tests but I cannot find any good examples of how to write a basic test. There are examples on here that use CUITe but these posts are from 2011 and I'm not sure how relevant they are anymore with the new upgrades to CUIT from Microsoft.
These tests need to be integrated with my build environments in Visual Studio 2012 Ultimate, that is why I'm not using Selenium.
And Code samples or links to good tutorials would be appreciated, but in particular I am looking for an exampl on how to start hand coding my CUITs
The Code First coded UI test API project on CodePlex (http://codeduicodefirst.codeplex.com/) includes a project demo that you can download - application and tests. It's designed for building CUIT tests without the dependency on record/playback.
The biggest thing that you need if you're going to work on a code-only basis is a way to avoid the dependency on the autogenerated object map the CUIT recordings create. The Code-First project uses classes mapped to individual page objects to work around this - you'd need to extend the project code to work with desktop applications if I remember correctly.
(I am not affiliated with this project in any way - it's just the only hand-coding resource other than CUITe that I've found, and CUITe hasn't been updated in a while, the last I saw).