Lecture
As a test engineer, you have probably heard of such types of testing as «smoke», «sanity testing», «re-test», and regression testing. It is quite possible that you use many of these types on a daily basis.
In this article I would like to bring clarity and explain the difference between these types of testing, and try to figure out where to draw the boundaries (even if conventional) between where one type of testing ends and another begins.
For newcomers to testing (and even experienced testers), distinguishing between these concepts can be difficult. Indeed, how do you tell where sanity testing ends and smoke testing begins? How narrowly should we limit the check of a part of the system's functionality or its components in order to call it «smoke» testing? Is entering a login/password into a website's user login form a smoke test, or is the very fact of its appearing on the site's page already a passed test?
Strictly speaking, you will still be able to carry out testing even if you cannot say exactly what the difference is. You may not even think about distinguishing which particular type of testing you are currently doing. But nevertheless, in order to grow professionally, you need to know what you are doing, why, and how correctly you are doing it.
Below are brief definitions of the types of testing that we are comparing today:
Both of these types of testing are aimed at avoiding a waste of time and effort, at determining the software's shortcomings and their severity more quickly, and at determining whether it deserves to move on to a phase of more thorough and detailed testing or not.
For a better understanding, below is a comparison table of these concepts and their areas of application:
| Smoke | Sanity | Regression | Re-test |
|---|---|---|---|
| Performed with the goal of checking that the critically important functional parts of the AUT work as they should | Aimed at establishing the fact that certain parts of the AUT still work as they should after minor changes or bug fixes | Confirm that recent changes in the code or the application as a whole have not had a negative impact on already existing functionality/set of functions | Re-checks and confirms the fact that previously failed test cases pass after the defects have been fixed |
| Goal — to check the «stability» of the system as a whole, in order to give the green light for more thorough testing | The goal is to check the general state of the system in detail, in order to proceed to more thorough testing | Goal — to make sure that recent changes in the code have not had side effects on established, working functionality | Re-test checks that the defect is fixed |
| Re-checking defects is not the goal of Smoke | Re-checking defects is not the goal of Sanity | Re-checking defects is not the goal of Regression | The fact that the defect is fixed is confirmed by Re-Test |
| Smoke testing is performed before regression testing | Sanity testing is performed before regression testing and after smoke tests | Carried out based on the project's requirements and the availability of resources (covered by autotests); «regression» can be carried out in parallel with re-tests | — Re-test is performed before sanity testing — Also, re-test has a higher priority than regression checks, so it should be performed before them |
| Can be performed automatically or manually | More often performed manually | The best reason to automate this type of testing, since manual testing can be extremely costly in terms of resources or time | Not amenable to automation |
| Is a subset of regression testing | A subset of acceptance testing | Performed with any modification or changes in an already existing project | Re-test is carried out on the fixed build using the same data, in the same environment, but with a different set of input data |
| Test cases are part of the regression test cases, but cover extremely critical functionality | Sanity testing can be performed without test cases, but knowledge of the system under test is required | Regression testing test cases can be derived from functional requirements or specifications, user manuals, and are carried out regardless of what the developers have fixed | The same test case that identified the defect is used |
Let me give an example of distinguishing these concepts on my current project.
Example: we have a web service with a user interface and a RESTful API. As testers, we know:
Then a number of statements can be made about which types of tests need to be used at which point in time:
At the same time, if this API also accepts post requests, then obviously these particular requests need to be included in a separate sanity test set. By analogy with the UI, we will check all the pages of the application.
I hope that after reading this article, you will gain clarity on which type of testing you are using at which stage, and what the difference is between these types of testing. As mentioned at the beginning, the boundary between these concepts is quite conventional and is left to your discretion within the scope of the project.
Often «consistency testing» or «testing for sanity» is called by the term «sanity testing». I think this comes from the phonetic properties of the English word sanity, which sounds similar to something «sanitary». Both variants can be found on the internet. With respect to this article, please consider «sanity» testing as «consistency testing».
Comments