Component testing is a method where testing of each component in an application is done separately. Suppose, in an application there are 5 components. Testing of each 5 components separately and efficiently is called as component-testing.
- Component testing is also known as module and program testing.
- It finds the defects in the module and verifies the functioning of software.
- Component-testing is done by the tester.
- Component-testing may be done in isolation from rest of the system depending on the development life cycle model chosen for that particular application.
- In such case the missing software is replaced by Stubsand Drivers and simulate the interface between the software components in a simple manner.
- Let’s take an example to understand it in a better way.Suppose there is an application consisting of three modules say, module A, module B and module C. The developer has developed the module B and now wanted to test it. But in order to test the module B completely few of it’s functionalities are dependent on module A and few on module C. But the module A and module C has not been developed yet. In that case to test the module B completely we can replace the module A and module C by stub and drivers as required.
- Integration testing is followed by the component testing.
A stub is called from the software component to be tested. As shown in the diagram below ‘Stub’ is called by ‘component A’.
A driver calls the component to be tested. As shown in the diagram below ‘component B’ is called by the ‘Driver’.
Below is the diagram of the component-testing:
Differences between Unit and Component testing
|1. Testing individual programs, modules to demonstrate that program executes as per the specification is called Unit Testing.||1. Testing each object or parts of the software separately with or without isolation of other objects is called Component Testing.|
|2. Its validated against design documents.||2. Its validated against test requirements, use cases.|
|3. Unit testing is done by Developers.||3. Component testing is done by Testers.|
|4. Unit testing is done first.||4. Component testing is done after unit testing is complete from the developers end.|
612 total views, 3 views today
A Soon-to-be Computer Engineer by profession, he has profound devotion to add Data Scientist as a prefix to his name. He’s been to the nooks of the web (at least of the surface web) and planning to add some real figures in his pocket!