Functional Testing

Understanding and implementing Functional Testing in software development

Functional testing is a deterministic test that verifies all modules of a sub-system are working together. It avoids integrating with other sub-systems, preferring test doubles instead.

Functional Test

Overview

Functional testing verifies a system’s specification and fundamental requirements systematically and deterministically. It introduces an actor (typically a user or service consumer) and validates the ingress and egress of that actor within specific consumer environments.

  1. Write tests from the perspective of an “actor” (user interacting with UI or service interacting with API)
  2. Avoid real I/O to reduce flakiness and ensure deterministic side-effects
  3. Use test doubles when the system under test needs to interact with an out-of-context sub-system

Alternate Terms

  • Component test

Resources

Examples

🚧 Under Construction 🚧

Platform Tools
Android Google Truth/JUnit 5, Android Espresso
iOS XCTest, XCUITest
Web Testcafe
Java BE TestNG, JUnit5
JS/node BE Framework: jest
Assertion & Mocking: expect (jest), supertest, nock, apollo
Code Coverage: istanbul/nyc
Last modified September 26, 2024: chore: improve images and seo (dc539dd)