What Are the Real-Time Examples of Smoke and Sanity Testing?

DZone 's Guide to

What Are the Real-Time Examples of Smoke and Sanity Testing?

Here are some real examples of smoke and sanity testing and the implications for testing using each.

· Microservices Zone ·
Free Resource

Today, almost every business is effectively dependent on software and before these are released for their users, software testing becomes crucial. Software testing is a wide concept with different testing types and each testing type having a different purpose in the software development lifecycle (SDLC). 

Among the many different types of testing, smoke testing and sanity testing are two most confusing terms as these two revolve around the software build. However, these two tests help teams to overcome the functional complexities in the program.

The software testing types are broadly classified as functional testing and non-functional testing. Under the functional testing, there a number of test practices that include unit testing, integration testing, system testing, interface testing, smoke testing, sanity testing, acceptance testing, etc. From these functional testing types, smoke testing and sanity testing are the most confusing terms.

These two practices revolve around software build, i.e. smoke testing is performed on the initial software build; while sanity testing is performed after a software build is received. Here, the software build is the process by which source code is transformed into a standalone form in order to run on a system. With the effective performance of smoke testing and sanity testing, the bugs and defects in the functional complexities are resolved at the early stages of SDLC.

What is Smoke Testing?

Smoke testing is the type of software testing that is performed during the initial software build and thus it makes sure that all the critical functionalities of the program are resolved and the programs work effectively. Smoke tests can be performed either manually or with automation. 

Also, for executing these smoke tests, there is no need for writing any new test cases, rather a necessary test case that is already written by programmers can be picked.

Smoke testing is the subset of acceptance testing and the main objective of this testing is to validate the newly created build’s stability in order to face more rigorous testing.

Example of Smoke Testing Test Case

Considering a scenario such as validating the login credentials. Here, the login functionality of the application has to ensure that only a registered user is allowed to log in with a valid username and password. 

Now, the steps required to perform the test are launching the application, navigating to the login page, enter a valid username and password, and then clicking on the login button.

Now, if the logins are correct, then the actual result will be as expected, i.e, will be login is successful, or else the status of the test is declared as fail.

What is Sanity Testing?

Sanity Testing is the type of software testing, that is performed after a software build is received with changes in functionality and code. Sanity testing is performed in order to assure that the bugs have been fixed and there are no other bugs originated with the new changes. 

Sanity testing doesn’t focus on core functionalities, rather it focuses on verifying the rationality and correctness of the software.

The main objective of sanity testing is to ensure that there are no bugs or false results in the component processes.

Example of Sanity Testing Test Case

Consider a project, where there are five modules such as home page, login page, new user creation, user detail page, and task creation. As per the requirements, the username in the login page should not accept less than six characters, and the bug is created when a username with less than six characters is accepted.

The bug is then reported to the development team for fixing by the testing team. Now, the development team fixes the issue and again passes it on to the testing team to re-check. The testing teams then check that the bug fixed by the development team is not affecting the functionality of other modules. This way of testing the extreme functionalities of the modules and not going in detail is nothing but sanity testing.


The above-mentioned information is about the importance of smoke testing and sanity testing with a test case example. Both the testing types have significant importance in eliminating the bugs and defects in the software at the early stage. 

Leverage functional testing services from leading QA testing teams and make your software defect and bug-free at the early stage of SDLC.

microservices, performances, real time examples, sanity testing, smoke testing, testing

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}