Edge cases are a common topic of discussion in software testing. The definition of “edge case” itself is pretty straightforward. But there are many different types of bugs that can fall under the category.
Edge Case Definition and Meaning
In software testing, edge cases are bugs that are uncommon for users to encounter. Note, though, that this doesn’t always mean that it’s hard to reproduce the bug.
Sometimes the bug may be happening 100% of the time – but only on an iPhone model that makes up a very small share of the customer base. Other times, the bug might be happening across browsers/devices, but only 1% of the time.
An edge case can be a minor issue – for example, an inconsistency in the exact shade of blue used on an iOS app vs. the Android version. But it can also be a bug that’s severe when it does happen – like a crash.
Common Edge Cases
This is a bit of an oxymoron, as the whole point of an “edge case” is that it’s not happening affecting many users. But there are still certain edge cases that can be fairly common among different apps or websites overall. Some of these include:
- Crashes. One of the most common edge cases is when an app crashes without an obvious or very reproducible path. Oftentimes, the developer would be able to look at the code and determine the cause. But as a tester, you may not be able to easily reproduce the crash. (Good luck getting a screen recording!)
- A section of the app or website taking an extra 5 seconds to load once in awhile (regardless of network speed).
- Audio continuing to play in the background after closing a video screen on occasion.
Some edge cases are unique to the app or website they occur on. But others can be seen on many different types of websites or mobile apps.
How to Find Edge Cases in Software Testing
Sometimes you might stumble upon edge cases without even trying. After all, as a tester, you’re using the software far more than a real user likely would be. Therefore, you have more opportunity to encounter anything and everything that could go wrong.
Other times, you’ll have to seek edge cases out via regression testing. That means checking every section and function in the software. This can also make it more likely to find certain bugs that may happen as a result of heavy usage.
Writing Edge Test Cases
Ideally if you have test cases for regression testing, these will uncover any potential edge cases. Or at least any that have even a remote chance of affecting real users! Edge cases don’t necessarily need specific test cases. That might also waste valuable time that would be better spent looking for more universal bugs.
But a good set of regression test cases should enable you to find all but the most uncommon edge cases. If you’re not sure how to write good test cases, you can learn more in our guide to QA test cases. You can also learn how to write test cases without requirements.
Do Edge Cases Need to be Fixed?
It depends on a couple of factors. Just how uncommon is it, and how severely does the issue affect usability? For example, a bug happening 1% of the time may sound pretty rare. But if the bug is a user being unable to check out of a shopping cart, and the platform has 500,000 users, that could make a big dent in revenue.
Some teams think that a bug being an edge case means it never needs to be fixed. But this isn’t always the best outlook. Just because something doesn’t affect a large number of users, or happen very often, doesn’t mean that it can’t cause problems. Particularly if it’s an easy fix, it’s often worth doing. Not only will this improve the software, but it will also lessen the chance that your customer service team will have to respond to complaints from users affected.
Users can abandon an app or website because of bad user experience. Even if the bug doesn’t severely impact functionality, it could still be worsening the overall user experience.
It’s also beneficial to keep in mind that a bug affects more than just the people who encounter it. These days, word can spread fast – and many people are more than happy to use public social media accounts to complain. Even if a bug doesn’t affect the majority of your users, an affected user may tweet about it. As a result, your product will look bad to anyone who sees the post.
Edge Cases in Software Development
If you work in software testing, you’ve likely encountered edge cases while testing an app or website. If you haven’t used the term before, it can be very helpful when describing bugs to developers. If you tell a software developer that a bug is an “edge case,” they’ll immediately understand that it may not be 100% reproducible. This can save time going back and forth, and misunderstandings on both sides! (Learn more about the QA and developer relationship.)