Component testing
Component testing evaluates an individual software component and its behavior at its boundaries, independently of the wider system while allowing relevant interactions with dependencies.
BDD in Action, Second Edition
A component test evaluates an individual software component or UI component in isolation from parts of the wider system.
- How it is used
- Applies isolated UI checks when full-system assembly adds cost without improving confidence in the behavior under test.
- How deep it goes
- Explains isolation and test-boundary choices with registration scenarios, but stops short of detailed component-test implementation.
- Examples
- Uses registration-field validation, terms acceptance, mocked services, Storybook, and Playwright Component Tests as examples.
- What you can do after
- Apply it via Storybook or Playwright Component Tests to verify UI behavior without deploying the entire system.
Read how BDD in Action, Second Edition explains component testing →
Web Components in Action
Component testing is the practice of verifying a reusable interface component's behavior, rendering, and public API in isolation.
- How it is used
- Verifies Web Component behavior, rendering, and public APIs through browser-run tests.
- How deep it goes
- Builds fixtures, suites, assertions, and boundary tests without descending into browser automation internals.
- Examples
- Uses a slider fixture to test initial values, JavaScript setters, rendered thumb position, and min/max clamping.
- What you can do after
- Apply it via Web Component Tester, Mocha, and Chai to run component tests in automated browsers.
Read how Web Components in Action explains component testing →
Build Financial Software with Generative AI (From Scratch)
Component testing is testing that evaluates an isolated software component, such as an API, independently of other components.
- How it is used
- Evaluates an API independently to catch malformed requests and exception conditions.
- How deep it goes
- Demonstrates endpoint assertions and BDD structure, while deferring broader testing categories and detailed implementation.
- Examples
- Uses a FastAPI /files endpoint, TestClient assertions, and a BDD feature with step definitions.
- What you can do after
- Apply it via FastAPI TestClient to verify endpoint status codes and response data.
Read how Build Financial Software with Generative AI (From Scratch) explains component testing →
Also covered in
- The Art of Unit Testing 3e
- Retrieval Augmented Generation, The Foundational IdeasIn early access (MEAP)
- Building Distributed Applications that Work
- Vanilla WebIn early access (MEAP)
What to know first
- contractA contract is an agreement or specification defining conditions, obligations, or behavioral expectations that govern interactions between parties or software components.
- GraphQLGraphQL is a query language and execution specification for APIs that lets clients request and manipulate data through a schema.
Related concepts
- software testingkind of · Software testing is the systematic evaluation of software under specified inputs or conditions against expected behavior or requirements to assess correctness and detect defects.
- React Testing Libraryused by · React Testing Library is a JavaScript library for testing React components through their rendered behavior, user-facing interactions, and accessible interfaces.
- system-level verificationcontrasts with · System-level verification evaluates software behavior and interactions among components assembled as a complete or substantially complete system.
- integration testcontrasts with · An integration test evaluates whether multiple software components or a component and an external dependency interact and behave correctly together.
Questions about component testing
What is component testing?
Component testing evaluates an individual software component and its behavior at its boundaries, independently of the wider system while allowing relevant interactions with dependencies.
Which Manning books explain component testing?
BDD in Action, Second Edition, Web Components in Action and Build Financial Software with Generative AI (From Scratch).
What should I know before learning component testing?
Manning books that teach component testing usually introduce contract and GraphQL first.
What is the difference between component testing and system-level verification?
Component testing evaluates an individual software component and its behavior at its boundaries, independently of the wider system while allowing relevant interactions with dependencies. System-level verification evaluates software behavior and interactions among components assembled as a complete or substantially complete system.
What kinds of component testing are there?
Kinds of component testing include Angular component testing.
What is component testing a kind of?
Component testing is a kind of software testing. Software testing is the systematic evaluation of software under specified inputs or conditions against expected behavior or requirements to assess correctness and detect defects.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


