5.4. Problems with UI Automation

Testing the UI is a heated topic in testing circles. Many will argue that testing the UI is a waste of time as there are too many problems associated with this type of testing. You have learned that fragile tests increase maintenance tasks by requiring the developer to modify many tests each time the functionality of the system being tested is changed. UI tests are fragile tests and in most projects require the most maintenance, more than all other types of tests. UI testing is considered black box testing; as a tester you will supply the input and only verify the expected outcome without looking at the code that provides the outcome. With black box testing you are not expected to see how the inputs are processed or how the output is generated. There is no way to ensure that each code path is effectively tested (see Figure 5-1).

Figure 5-1. Black box testing

Fragile tests are tests that are very sensitive to the functionality of the system being tested. Fragile tests break often and require a great deal of maintenance. Fragile tests require the most maintenance of any other type of test. Because of the close relationship with the function of the system, and how frequent functionality can change, functional tests are considered to be fragile tests.

  • Fragility Due to Layout Changes. When a developer learns that automated testing of a UI can be performed, ...

Get Testing ASP.NET Web Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.