I found several blog posts about how to execute code UI tests using mstest utility, but I need to execute them from my C# application. I tried the simplest thing: I created
You need to call Playback.Initialize() before you execute the coded UI part, and then Playback.Cleanup() after.
http://social.msdn.microsoft.com/forums/wpapps/zh-cn/914e0ecb-6917-43ff-baf6-f30acc6469d3/unable-to-run-a-coded-ui-test-method-when-called-from-a-console-application-project-in-vs2012
http://blogs.microsoft.co.il/blogs/shair/archive/2010/07/15/running-codedui-test-from-another-application.aspx