Hand Coding a Coded UI Test

Amitd picture Amitd · Jan 4, 2011 · Viewed 7.4k times · Source

I have been working with Coded UI Test(CUIT) feature of VS2010 .
When recording the CodedUI framework generates a lots of hierarchical classes.

I was wondering whether coding(by hand) a CUIT would reduce the code created and would it be as optimized(in searching elements) as generated code??

Also what are the scenarios where a CUIT could be coded by hand?

Answer

Suresh Balasubramanian picture Suresh Balasubramanian · Sep 28, 2011

CUITe (Coded UI Test enhanced) Framework is for people who prefer hand coding. http://cuite.codeplex.com/

CUITe is a thin layer developed on top of Microsoft Visual Studio Team Test's Coded UI Test engine which helps reduce code, increases readability and maintainability, while also providing a bunch of cool features for the automation engineer.

CUITe allows you to define a much simpler Object Repository (== UIMap). Each page/window will be defined in a separate class file, and each UI control definition will be just a one liner. You can move common controls to a parent class which increases maintainability. You can also categorize the page/window definition classes into different folders as you deem fit.