Nishil Patel
Jan 25, 2024
5 min read
A sanity check is a quick test you run after adding new features or squashing bugs in software. It’s all about making sure the software acts in a way that makes sense. It’s a nifty tool for QA engineers who need to do a fast check on key functions. In this article, you’re gonna learn how to do these checks and what you have to keep an eye out for.
1.
Introduction
2.
What is a Sanity Check?
3.
When to Run a Sanity Check?
4.
How To Run a Sanity Check?
5.
FAQs
Every time a fresh feature is introduced or a bug is squashed in software, it needs to be checked out. Before you get into the nitty-gritty of testing, a swift validation for these new features or fixes can give you a solid head start.
That’s where a sanity check steps in, helping you conduct these speedy tests and validations. So, what exactly is a sanity check? How do you go about running one? What makes it tick? Let’s peel back the layers of sanity checks in software, answering these questions and unpacking a whole lot more in this post.
A sanity check, or sanity test, is a quick evaluation used in software testing to determine if a new feature or bug fix in a program or app is functioning as anticipated. It’s a way to test for “sanity”, which involves checking the logical behavior of new features or bug fixes in a stable software build.
As a QA engineer or tester, you might not always have the time to conduct a comprehensive test. Sometimes, you might need to swiftly assess a crucial function. So you can run a sanity check. In short, you confirm an expected behavior that needs to work fine for users in your application.
Let’s understand it better with a real-world use case of an online shopping platform:
As soon as the quantity reaches three, a message pops up:
“You can buy a maximum of 3 per user”
I’m sure you must have seen this happening at some point while shopping online.
Let’s dissect this example in the context of a sanity check:
Sanity checks are super useful in rapidly validating any major issues. If the test bombs, it’s a red flag for more testing and debugging.
Read More: Report Bugs Effectively: Writing Tips To Keep Developers Happy
Let’s dive deeper into the same example of an online shopping platform that limits a customer to purchase no more than three of the same discounted item. Use this step-by-step guide to do a sanity check for quickly passing your next build out to production:
Your aim is to carry out a non-comprehensive review of a specific feature—that is—to run a sanity check on your online platform when offering products at markdowns. The user can only purchase up to three if that item is on sale. This feature is fresh and crucial, so it has to work correctly.
First, focus on testing important parts when you change code for a new feature or fix a bug. These features need to work right in a stable app.
In the context of an online shopping platform, this could include:
After you have identified the critical function, which is:
Follow these steps to do a sanity check:
If everything works as expected, document the results.
Documentation is usually not required while conducting a sanity check. Still, it’s a good practice to keep a record of everything. This could prove to be important while debugging.
If any issues arise, use BetterBugs to provide detailed information on what went wrong using:
With BetterBugs you can:
Nishil is a successful serial entrepreneur. He has more than a decade of experience in the software industry. He advocates for a culture of excellence in every software product.
Meet the Author: Nishil Patel, CEO, and Co-founder of BetterBugs. With a passion for innovation and a mission to improve software quality.
We never spam.
Share your experience with the founderhere!