What is Sanity Testing with examples | BrowserStack (2024)

Home Guide What is Sanity Testing with examples

October 17, 2022

In today’s era, for a Business to run successfully, there is a need to develop software that delivers a good end-user experience. Therefore, before the software is released in the market, it needs to be tested efficiently. While there are numerous phases to creating great software, testing is still the most important step before it is released. Software Development Lifecycle (SDLC) consists of a number of testing types, each testing type having a different purpose.

These testing types are broadly classified into two: Functional testing and Non-functional testing.

Functional testing involves unit testing, integration testing, system testing, smoke testing, sanity testing, etc. This article covers Sanity testing, which revolves around a software’s build. Sanity Testing helps the testing team to overcome the functional complexities in a program at the early stages of SDLC.

Table of Contents

  • What is Sanity Testing?
  • Features of Sanity Testing
  • Objectives of Sanity Testing
  • What is the process of Sanity Testing?
  • When should Sanity Testing be conducted?
  • Let’s understand Sanity Testing through an example
  • Benefits of Sanity Testing
  • Disadvantages of Sanity Testing
  • Test on Real Devices for Accurate Results

What is Sanity Testing?

Sanity Testing or Surface Level testing is a type of testing which is performed on the stable build of the software. It is a quick and basic test (or set of tests) to ensure that the code changes made are working properly without any bugs. It is a subset of Regression testing and is usually executed after the software product has passed the Smoke test.

Features of Sanity Testing

Some features of Sanity testing include,

  1. Simple: Easily designed and performed.
  2. Unscripted: It is not scripted most of the time.
  3. Undocumented: Usually, it is not documented.
  4. Deep testing: Limited functionalities are covered deeply.
  5. Subset of Regression testing: Focusses on a smaller section of the application/software at a time.
  6. Performed by testers: Testers are the ones who do the Sanity testing.
  7. Comprehensive: Covers the basic assessment of how software behaves.

Objectives of Sanity Testing

The main objectives of Sanity testing are:

  • Defining the planned features works as expected.
  • Saving time, complexity, and costs in case the sanity test fails for a build.
  • Ensuring that the new updates don’t change the software’s existing functionalities.
  • Validating the accuracy of the newly added components and features.

Read More: How to test UI components?

What is the process of Sanity Testing?

The Sanity testing process has the following steps:

  • Identification

In this step, newly added features and components are detected. Also, the modification presented in the code is detected while bug fixing.

  • Evaluation

These newly implemented components and attributes are analyzed and modified to check whether they work as intended as per the given requirements.

  • Testing

A smaller section of the newly linked components is tested deeply. The test will fail if these newly introduced components do not fulfill their requirements. If it meets the need, the Sanity test is passed. Next, System testing is performed thoroughly to ensure that these functionalities do not interfere with the previously installed system and application components.

What is Sanity Testing with examples | BrowserStack (2)When should Sanity Testing be conducted?

Sanity Test should be performed in the following cases:

  1. If there is a minor change in the code.
  2. When the build is received after a number of regressions.
  3. After bug fixes.
  4. Before production deployment.

Let’s understand Sanity Testing through an example

Consider you developing an online Food ordering app, and you want to offer a 10% discount on New Year (1st January) for your members having an elite membership.

Sanity testing will verify the following:

  • Elite members get the discount on the 1st January.
  • Members, who add the elite membership to their food orders on the 1st, also get the discount.
  • Non-elite members do not get the discount on the 1st January .
  • No member receives that rebate before and after the 1st January.
  • Other discount coupons can not be clubbed together with this 10% discount.
  • Elite members, who opt for other deals, do not get the New Year deduction.

Sanity testing does not verify other areas of the app, like delivery tracking or restaurant reviews. That is done by Smoke testing and Regression testing, which happen before and after Sanity testing.

If Sanity testing fails, the app is sent back to the developer for troubleshooting. However, if it succeeds, the app is sent for thorough System testing.

Benefits of Sanity Testing

Some of the benefits of Sanity Testing are:

  • It helps in the rapid detection of problems in a Software’s core functionality.
  • It may be completed in less time due to no documentation.
  • If software issues are discovered during sanity testing, it is rejected, which saves time and effort for regression testing.
  • It is expensive compared to other testing types.
  • It helps to identify missing objects that are dependent.
  • It is used to verify a small functionality of the app, whether it works as expected or not.
  • It helps in focussing on validating the app’s functioning rather than thorough testing.
  • It is fruitful in scenarios where the testing time is limited.

Disadvantages of Sanity Testing

Some of the limitations of Sanity Testing are:

  • It covers only a few functionalities of the application. Issues in the unchecked functionalities can’t be recovered.
  • It only focuses on the functions of the software.
  • Since it is usually unscripted, future references are not available.
  • It doesn’t cover the design structure level, and hence, it will be difficult for the development team to identify and fix the issues.

Test on Real Devices for Accurate Results

Sanity testing focuses on determining whether more testing is necessary for a software application. It is crucial because it saves a lot of time and effort when any issue in the system is discovered. Sanity tests also give a quick update on the progress of the release so that the next set of actions can be planned accordingly.

However, it is important to test on real devices and browsers, taking real user conditions into account for more accurate test results. This will help in identifying how the app function in real-world conditions, especially in finding bugs. BrowserStack Live helps in performing a quick Sanity test for web apps on 3000+ real device-browser combinations. While BrowserStack App Live allows you to perform Sanity testing on mobile apps across real devices on iOS and Android platforms.

Try BrowserStack for Free!

What is Sanity Testing with examples | BrowserStack (2024)

FAQs

What is sanity testing with simple examples? ›

A sanity test is an approach for testing software applications to check whether new functionality, change, or bug fix is implemented successfully or not. Its scope is narrow and focused, which allows ensuring whether your software release meets the requirement for rigorous testing or is too flawed to be tested.

How do you explain sanity testing in an interview? ›

Sanity testing is performed to ensure that the code changes that are made are working properly. Sanity testing is a stoppage to check whether testing for the build can proceed or not. The focus of the team during the sanity testing process is to validate the functionality of the application and not detailed testing.

What is the meaning of test my sanity? ›

it's a figure of speech, basically, if someone claims to need a sanity check they must be so overwhelmed by something in their life they feel like they're going mad, burdened by a problem they cant figure out and have nobody to lean on that could maybe assist and lessen their 'burden' and thus feeling as if theres ...

What is sanity and how do you use it? ›

Sanity uses structured content to endlessly re-use content across any channel and a composable approach to help businesses connect to any third-party technology, data source, and front end framework. With Sanity you can manage your text, images, and other media with APIs.

Why is it called sanity testing? ›

It is performed on the stable build of the software. To understand the concept of sanity testing, we can analyze its name: sanity. The term came from the concept of “sanity check”. The goal is also to verify that the build is stable enough for further testing, similar to smoke testing.

What is sanity checklist? ›

A sanity checklist is usually run on stable but not necessarily functional software. For example, after making small changes to a software build, software testers can run sanity tests to ensure those changes work correctly before proceeding to full regression testing.

What is the difference between UAT and sanity? ›

It is generally considered as part of regression testing. Sanity is done by testers. UAT on the other hand is testing done by the end users and takes place on client location. This is the last phase of testing life cycle.

What is sanity testing in agile methodology? ›

Sanity testing helps in identifying defects related to recent changes or updates, ensuring that the new code integrates well with the existing system without causing disruptions. This is particularly important in Agile and iterative development models where changes are frequent and incremental.

Is sanity testing functional or nonfunctional? ›

Several testing types are considered functional testing like smoke testing, sanity testing, regression testing, and more.

How long does sanity testing take? ›

Regression Testing
Sanity TestingSmoke Testing
It is non-scriptedIt is scripted
It takes very less time to be performed.It takes not more than 30 minutes.
It determines whether the application should be tested for regression.It determines whether the application is stable or not.
4 more rows
Oct 31, 2016

What is the difference between retesting and sanity testing? ›

Re-Testing is carried out to check and confirm that the test cases that failed in the final execution are passing after those errors/defects are solved. Sanity Testing is carried out to check and confirm that the functionalities are working perfectly after minor functionality/bug fixes or any changes.

What is a real example of sanity testing? ›

Suppose you develop an online food ordering application, and you want to offer a 15% discount on Christmas (25th December) for your members having a premium membership. The sanity testing will verify the following: Premium members get the discount on the 25th.

What is sanity testing in QA? ›

Sanity testing acts as a selective regression testing tool. It checks only critical functionalities after minor updates or fixes, focusing on specific components rather than the entire system. This approach efficiently confirms that recent changes do not adversely affect existing functionalities.

What are the advantages of sanity testing? ›

Advantages of sanity testing

Saves a lot of money in comparison to the other types of testing. Allows to detect problems in a software's core functionality rapidly. Aids in the rapid identification of defects in core functionality and the identification of missing dependent objects.

What is sanity check short? ›

A sanity check or sanity test is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true. It is a simple check to see if the produced material is rational (that the material's creator was thinking rationally, applying sanity).

What is a real time example of smoke testing? ›

Imagine you're testing a newly developed web application. One critical feature is user authentication, ensuring only registered users can log in with valid credentials. In a smoke test, you would verify the following: User Registration and Login: Confirm that users can register and log in using their credentials.

What is the difference between sanity testing and regression testing? ›

Sanity testing is used after small code changes or bug fixes. Also, it is used to check critical functionalities before a more in-depth testing phase. Regression testing is conducted after major changes, updates, or feature additions. While both tests serve distinct purposes, they complement each other.

What is the difference between functional test and sanity test? ›

A sanity testing is the basic testing of the most important feature set of a product. It just tells you whether the new build is good enough for detail testing or not. Functional testing is the testing of all the functionalities of a product in detail, covering every scenario to find the regression.

Top Articles
Are CDs Safe? Unlocking the Truth About Your Savings Security
Grade Rounding Doesn’t Teach Real Consequences
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Umn Biology
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 5711

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.