Chapter 15. Coded User Interface Testing

WHAT'S IN THIS CHAPTER?

  • Understanding how coded UI tests can be used to create automated functional UI tests

  • Learning how to create a coded UI test from scratch, or from existing action recordings

  • Learning techniques for making coded UI tests more robust

In Chapter 14, you saw how Visual Studio 2010 has matured to provide first-class support for manual testing. Manual tests are relatively cheap to author, which makes them well-suited for testing your application while it's undergoing regular changes. As the user interface (UI) undergoes churn (perhaps because of usability feedback, or additional features being implemented), it's easy to update manual test cases to reflect those changes. After all, a manual test is essentially just a textual list of steps.

The downside of manual tests is that, by definition, they require human intervention to execute and validate. As an application grows, it may become cost-prohibitive to run every manual test for every build you're testing. The desire is to use automated tests that can be run routinely to help ensure application integrity, without requiring ongoing human testing resources. Visual Studio 2010 has introduced a new test type known as a coded UI test, which is designed for functional UI testing.

A coded UI test provides a mechanism to automatically execute and validate a test case. Unlike most other automated tests (such as unit tests), a coded UI test operates at the user-interface layer and "drives" ...

Get Professional Application Lifecycle Management with Visual Studio® 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.