As a testing engineer, you've probably heard of such types of testing as smoke, sanity, re-test and regression testing. It is quite possible that many of these types are used by you on a daily basis.
In this article, I would like to clarify and explain the difference between these types of testing and try to figure out, draw boundaries (albeit conditional) where one type of testing ends and another begins.
For beginners in testing (and even experienced testers), separating these concepts can be difficult. And in fact, how to distinguish where sanity testing begins and smoke ends? How much do we need to limit the verification of a part of the functionality of the system or its components to call it "smoke" testing?
Is entering a login/password into the user login form on the site a smoke test, or is the very fact of its appearance on the site page already a passed test?
Strictly speaking, you will still be able to conduct testing, even though you won't be able to tell exactly what the difference is. You don't even have to think about the distinction of what kind of testing you are currently engaged in. But still, in order to grow above yourself in a professional sense, you need to know what you are doing, why, and how well you are doing it.
Below are brief definitions of the types of testing that we are comparing today:
Smoke tests: are performed every time we receive a new build (version) of a project (system) for testing, while considering it relatively unstable. We need to make sure that the critical AUT (Application Under Test) functions are working as expected.
The idea of this type of testing is to identify serious problems as early as possible, and reject this build (return it for revision) at an early stage of testing, so as not to delve into long and complex tests, thereby not wasting time on obviously defective software.
Sanitary testing: Used every time we get a relatively stable software build to determine the operability in detail. In other words, it validates that important parts of the system functionality work according to the requirements at a low level.
Both of these types of testing are aimed at avoiding the loss of time and effort in order to quickly identify software flaws and their criticality, as well as whether it deserves to go into a phase of more in-depth and thorough testing or not.
Re-test: Performed if the feature/functionality already had defects, and these defects were recently fixed.
Regression tests: actually, what takes the lion's share of time and what testing automation is for. Regression testing of AUT is carried out when it is necessary to make sure that new (added) application functions / fixed defects did not affect the current, already existing functionality that worked (and tested) earlier.
For a better understanding, a comparative table of these concepts and areas of application is presented below:
I will give an example of the differentiation of concepts on my current project. Example: We have a web service with a user interface and a RESTful API. As testers, we know:
Then you can make a number of statements about what types of tests you need to use at what point in time:
By executing one simple GET request to one of these entry points, and receiving a response in json format, we are already convinced that the smoke testing has passed.
If one of these entry points also returns data from the database, while the first one does not, you need to additionally make another request to make sure that the application processes requests to the database correctly. And this is the end of the "smoky" test.That is, we executed the request — a response came from the service, and it did not "smoke", that is, it did not return a 4xx or 5xx error, and something inarticulate, instead of json. On this we can say that the "smoky" test has been passed. To check that the UI works the same way, just open the page in the browser once.
Sanitary testing in this case will consist of executing a request to all 10 api entry points, verifying the received json with the expected one, as well as the presence of the required data in it.
Regression tests will consist of smoke + sanity + UI running together in one heap. Purpose: to check that adding the 11th entry point did not break, for example, password recovery.
Re-test in this example is a point check that, for example, a broken api entry point in the next build works out as intended.
At the same time, if this api also accepts post requests, then it is obvious that it is necessary to include these requests in another set of sanity tests. By analogy with the UI, we will check all the pages of the application.
I hope that after reading this article, you will have clarity in determining which type of testing you are using at what stage, and what is the difference between these types of testing.
As mentioned at the beginning, the boundary between these concepts is very conditional and remains at your discretion within the framework of the project.
Thank you for your time, that is all.
Ruslan Muradov.