<Details
Component test
lab
Why?
Test a subsystem or component in isolation to ensure its correctness before integrating it with other components or modules.
How?
In a component test, you test whole components or subsystems, instead of the atomic chunks of code that you test in unit tests. Test the component against its input and output relations (e.g. specified via interfaces). Component testing compares the outputs with expected results given pre-defined inputs.
Ingredients
- A system that is split up into separate subsystems to allow for component testing.
- Access to and an understanding of the interfaces of the component under test.
- Drivers and stubs to simulate the behaviour of other components.
In practice
Companies that use component testing want simple and clear interfaces between the components, which they view as an essential precondition for successful component testing. Microservices are a way to accomplish this and are more commonly used nowadays.
Phase(s) of use
In the following project phase(s) component test can be used:
- Realisation