Windows Application Testing, Part III – Reflection Based UI Automation

In my last entry I described how software test engineers can write UI automation which calls Win32 API functions. Using this technique is powerful but somewhat difficult. So difficult in fact, that there are many companies which write libraries using the technique and sell the product as a commercial test framework. Examples include Mercury, Segue, ParaSoft, and Rational (part of IBM). These commercial test frameworks are very expensive. However, in a Microsoft .NET environment, there is an alternative approach to UI automation. Windows applications which are .NET applications (meaning created with C# or VB.NET and which run on a Windows machine) can be tested using a technique called reflection-based UI automation. "Reflection" is a term that means a set of .NET methods which testers can use to access almost all aspects of a Windows application, including the user interface. It turns out using this technique to write UI automation is significantly easier than calling Win32 API functions. The image below shows an example of reflection-based UI automation in action.

This entry was posted in Software Test Automation. Bookmark the permalink.