• Software Testing Dictionary
  • Home

Software Testing - Sanity Testing



Software testing is conducted at the every stages of software development life cycle (SDLC). Sanity testing is conducted to check if the basic functionalities of software are working fine on a new build. It is commonly performed at the initial phases of SDLC before running a full regression suite. The sanity test cases does not cover testing the whole of software and only concentrates on important functionalities and is not expected to detect all bugs in the software.

What is Sanity Testing?

Sanity testing is a subdivision of regression testing. It verifies if the new code changes are working as expected in the software. Moreover, the sanity testing is done primarily to validate if the new build is proper and can be used for further testing. It is done just to cover the overall functionalities and is not a detailed one. It is also performed on a build where production code is deployed post a critical bug fix.

Uses of Sanity Testing

The uses of sanity testing are listed below −

  • It is performed to validate if the new code changes have not introduced issues at the integration of various components in the software.
  • It is performed to verify the code changes for a bug fix, or feature implementation have been done properly.
  • It helps to plan and align resources by checking if the new build available is fit to carry out further testing.
  • It helps to perform a basic regression testing to test if the existing functionalities of the software have not been impacted by any new code changes.
  • It is a repeated process done to verify each incremental build in the continuous integration processes.

Attributes and Features of Sanity Testing

The attributes of sanity testing are listed below −

  • Narrow and Deep − Sanity testing has a narrow and deep approach where a handful of components are tested in depth.
  • Subdivision of Regression Testing − It is a subdivision of regression testing where mainly all the functionalities of the software are not targeted.
  • Unscripted − Sanity tests are unscripted and they are performed on an ad hoc basis without using any pre-written scripts.
  • Undocumented − Sanity tests are undocumented.
  • Executed by Testers − Sanity tests are executed by the test engineers.

Sanity Testing Process

The sanity testing processes consists of the below items −

  • Identification − The first process of sanity testing is identification of all new functionalities, modules etc along with the bug fixes.
  • Evaluation − After identification, analysis of every new component, attributes etc are done.
  • Testing − After identification and evaluation phases, the testing phase starts. At this time, every element, component etc are verified and updated to make sure they are working properly.

Sanity Test Example

Let us take an e-commerce application having multiple modules namely, add to cart, product search, payment etc. The tester finds a bug in the add to cart module, where the product ratings were not not getting displayed. Once he logs the bug, it moves to the development team’s bucket for the fix.

The tester reverifies it after it is fixed and checks if it has impacted any other related component. The product ratings are also displayed in the product search module of the software. As a part of sanity testing, the display of the product ratings feature in both the add to cart and product search modules are verified.

Advantages of Sanity Testing

The advantages of sanity testing are listed below −

  • It is easy to implement and comprehend.
  • It helps to determine deployment and compilation problems in a build.
  • It detects defects in the core software functionalities.
  • It requires very less time to execute sanity tests, as there is no need for any documentation.
  • It identifies the missing dependent objects.

Disadvantages of Sanity Testing

The disadvantages of sanity testing are listed below −

  • It is only concerned with the software commands and functions.
  • It does not include the design structure level so it is not easy for the developers to recognize and find a fix for the issues encountered during the sanity testing.
  • It is limited to a few features of the software and not all of them.
  • It is unscripted so future references are not available.

Conclusion

This concludes our comprehensive take on the tutorial on Software Sanity Testing. We’ve started with describing what is sanity testing, uses of sanity test, what are the attributes and features of sanity testing, what is the sanity testing process, an example of sanity testing, and what are the advantages and disadvantages of sanity testing.

This equips you with in-depth knowledge of Software Sanity Testing. It is wise to keep practicing what you’ve learned and exploring others relevant to Software Testing to deepen your understanding and expand your horizons.

Advertisements