Smoke Testing vs. Sanity Testing
What is Smoke Testing?
It is a type of testing that ensures that the basic and critical functions of an application are working well before in-depth testing or rigorous testing.
Smoke testing is also known as a subcategory of acceptance testing or building inspection.
In other words, it can be said that smoke testing is used to test all the functions of software or to check whether a version is broken or not.
In smoke tests, we only do positive tests, which means we can only enter valid data, not invalid data.
When we release a new build, we always start with a smoke test, because some changes might have broken an important feature of the new build.
What is Sanity Testing?
This is run to check if the errors have been corrected after the build.
Sanity testing is generally performed on stable builds.
This is also known as a variant of regression testing.
The initial purpose of performing sanity tests is to determine whether the intended features work approximately as expected. If the sanity test fails, the building is abandoned to save cost and time for more rigorous testing.
Difference between Smoke Testing and Sanity Testing?
The comparison chart below quickly sheds light on the important differences between smoke testing and sanity testing:
# | Comparison Basis | Smoke Testing | Sanity Testing |
---|---|---|---|
1 | Test Coverage | It is a broad approach to testing where all parts of the application are tested. | It is a narrow approach to testing where specific parts of the application are tested. |
2 | Measures | It measures the stability of the system by performing rigorous testing. | It measures the rationality of the system by performing rigorous testing. |
3 | Technique | Smoke testing can be either manual or automated. | Sanity testing can be done without test cases or scripts. |
4 | Executed by | It is performed by both testers and developers. | It is performed by only testers. |
5 | Purpose | Testing is done without getting into deep but whenever needed tester has to go into deep. | Sanity testing does not need to go into the deep of the application. |
6 | Performed at | Smoke testing is the first testing performed on the initial build. | Sanity testing is performed when the build is comparatively stable. |
7 | Documentation | Smoke testing is documented. | Sanity testing is not documented. |
8 | Used to | It is used to test End to End function of the application. | It is used to test only modified or defect-fixed functions. |
9 | Subset | It is considered a subset of acceptance testing. | It is considered a subset of regression testing. |