What is ingredient testing?
Component testing is defined as a type of software testing in which testing is performed on each individual component separately, without integration with other components. It is also known as Modular Test when it is viewed from an architectural perspective. Component Testing is also known as Unit Test, Program Test or Module Test.
According to the diagram below, there will be a test strategy and test plan for component testing. Where each and every piece of software or application is considered individually. For each of these components, a Test Scenario will be defined, which will be put into the High level test cases -> low level detailed test cases accompanied with prerequisites.
The use of the term “Component Testing” varies from region to organization and organization.
The most common reasons for differing perceptions of Component Testing are:
- Type of development lifecycle model is selected.
- Complexity of the software or application under test.
- Test whether or not it is separate from the rest of the software or application component.
- As we know Software testing lifecycle architecture has a lot of test-artifacts (done documents, used in test operations). Among the many trials-in-kind, it is the Test Policy & the Testing Strategy that defines the types of testing and the depth of the experiment to be performed in a given project.
Who performs component testing?
Component testing is done by testers. Unit testing is performed by developers where they perform individual functional or process testing. After Unit testing is done, next is component testing. Component testing is performed by testers.
When to perform component testing?
Component testing is performed as soon as Unit Testing is done by developers and builds are released to the testing team. This build is called the Unit Testing Build (UT). The primary functionality of all components is tested in this phase
Input criteria for component testing:
- The minimum number of ingredients included in a UT should be developed and unit tested.
- Stop criteria for component testing.
- Functions of all components will work fine.
- Does not have any defect of any severity or high or moderate severity.
Component testing techniques
Based on the depth of the inspection levels, component testing can be classified as
CTIS – Component Testing In Small / Small scale component testing
CTIL – Component Testing In Large / Large scale component testing
CTIS – Small scale component testing
Component testing can be performed with or without isolation of the rest of the other components in the software or application under test. If it is done with the isolation of another component, then it is called Small-scale Component Inspection.
Example 1: Consider a website with 5 different websites, then test each website separately & with the isolation of other components called Small Scale Component Inspection.
Example 2: Consider the homepage of the website guru99.com has many components like:
Home, Testing, SAP, Web, Must Learn !, Big Data, Live Projects, Blog and etc …
Likewise, any software is made up of multiple components, and in addition, each component has its own children. Test each of the modules mentioned in example 2 separately without considering integration with other components called CTIS.
Click on the ‘Testing’ dropdown and see the different subcomponents of the ‘Testing’ component. So the subcomponents shown are: Agile Testing, BugZilla, Cucumber, Postman, QTP, etc.
CTIL – Large-scale component testing
Component testing that is performed without isolating other software components or the application under test is known as Large Scale Component Testing.
Suppose there is an application consisting of three components: A, B, C.
Developer developed component B and wants it tested. But to fully test component B, some of its functions depend on component A and a few on component C.
Functional flow: A -> B -> C means that there is dependence on B from both A and C, according to the stub diagram is the called function, driver is the caller.
But component A and component C are not yet developed. In that case, to completely test component B, we can replace component A and component C with stub and driver as required. So basically the A&C component is replaced with stub & driver which acts like a mock object until they are actually developed.
- Stub: A Stub is called from the software component under test as shown in the diagram above, Stub is called from component A.
- Driver: A driver calls the component to be checked as shown in the diagram above, component C is called from the driver.
Unit Testing and Component Testing
Unit Testing | Component Testing |
---|---|
Check individual programs and modules to prove that the program executes according to specifications called Unit Test | Testing each object or piece of software separately with or without the isolation of other objects is known as Component Testing. |
It is validated based on the design documents | It is verified based on test requirements, use cases |
Unit Testing is done by Developer | Component testing is performed by Reviewer |
Unit test is done first | Component testing is performed after unit testing is completed from the developers. |
In brief:
In Software Engineering, Component testing plays an important role in finding errors. Before starting with Integration Testing, we always recommend performing component testing to ensure that each component of the application is working properly.
Integration testing is followed by component testing. Component testing is also referred to as module testing in some references.