Testing Scope and Focus | Component Testing involves testing each object or part of the software separately. | Unit Testing involves testing individual programs or modules for program execution. |
---|
Team | It is performed by the testing team. | It is performed by the development team. |
---|
Testing Approach | Component testing is black box testing. | Unit testing is white box testing. |
---|
Knowledge of Internal Architecture | The tester doesn't know the internal architecture of the software. | The tester knows the internal design of the software. |
---|
Which testing performed first? | Component testing is performed once the unit testing is performed. | Unit testing is performed before the component testing. |
---|
Defect Detection | Detection of defects is a little difficult as compared to unit testing. | detection of defects is easy in unit testing. |
---|
Sequence in SDLC | Once the whole software is developed then only component testing is performed. | Unit testing is performed after every development step. |
---|
Validation Focus | It validates test requirements. | It validates design documents. |
---|
Execution Level | The execution level of component testing is at the application level. | The execution level of unit testing is at the method level i.e. granular based. |
---|
Evaluation | Component testing validates the use cases and test specifications. | Unit testing is evaluated using the design documents. |
---|
Applicability | Component testing is appropriate for small applications. | Unit testing is appropriate for large-scale applications because of its flexibility and ease to use. |
---|
Scope | Component tests provide a more comprehensive picture of the application. | Because of granularity results of unit tests may not accurately reflect an application's actual behavior in practice. |
---|
Independence in Testing | Isolated test assertions in unit test leads to independent execution. | When developing component tests, we must ensure the functioning of entire application as a whole, and the interaction between different components also needs to be taken care. |
---|
Depth of Testing | Component tests can only validate the functionality of primary code path and cannot verify about the non-existence of alternate execution paths. | Unit tests will be able to capture the circumstances that component tests miss. |
---|