Code - Do you handle all possible scenarios?
Last updated by Brady Stroud [SSW] 6 months ago.See historyWhen developers build software, they naturally become experts in using the software. This is problematic because with this expertise, they will tend to focus on the happy path of the user. However, it is important to consider all possible scenarios that could occur. This includes edge cases, such as invalid inputs, unexpected user behavior, and system failures. By handling all possible scenarios, you can ensure that your code is robust and reliable.
Here are some tips to help you spot where you need to handle more scenarios:
-
Think of potential "unhappy paths"
- Ask yourself "what could the user do wrong here?" (e.g. What if the user enters an invalid email address?)
- Assume your users are doing something for the first time
- Get a test please on all your code
- Do some exploratory testing