5.2. Functional Testing

Functional tests have many different responsibilities. Part of their role is to ensure that the system being developed meets the requirements set out by the customer. In some circumstances they ensure that goals and metrics — such as performance metrics — are met. Functional tests can also allow customers to monitor the system while it's being developed. At a low level, functional tests will be created by testers to test functionality, such as the UI and performance testing. At a higher level, acceptance tests may be created by the customer to ensure that the software meets the external requirements. Functional tests should pick up where unit tests left off and start testing the system with concrete implementations and in a more end-to-end process with the aim of catching integration problems and missing requirements. When acceptance tests have been well written, they can act as a specification because they are readable by a customer. This concept will be covered in more depth in Chapter 6.

Functional tests can be invaluable during a major refactoring of a system. When large refactorings occur, a large number of unit tests can break and it can be hard to determine which tests were expected to fail. Functional testing will help indicate to you when the application is restored to a known state and indicate if manual testing should begin.

Unlike unit tests, functional tests can take a long time to run. Often a well-defined suite of functional tests will run ...

Get Testing ASP.NET Web Applications 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.