In this post, let’s discuss test cases for checkbox. Checkboxes are often included in scenarios where multiple choice or single action from user is expected. Depending on the CSS properties, these checkboxes can be designed as well. And you can include the respective test cases for the same. We are writing test cases based on the web form application. I have attached the screenshot below. You can use the below checkbox screenshot for writing your own test cases as well.
Let’s assume we have bunch of checkboxes on web based form. You can even consider windows based application instead. In both the type of applications, checkboxes will function exactly the same. Most of the web based applications use checkboxes for acquiring multiple choice information. Some apps also use the checkbox data to decide user behavior for their further usage of the application. In either case, checkboxes decide the user choices.
Test cases for Checkbox
Here are some of the test cases for the checkboxes.
- Check if the checkbox is selectable or not.
- Check if the checkbox selection enables the specific element as selected by mouse pointer or keyboard selection.
- Check if the checkbox is selected and pressing submit redirects to the option as per the choice made.
- Check if the checkbox selection is properly recorded in database or for browser redirection.
- Uncheck one checckbox and select another and click on submit and verify if different choice is considered in redirection.
- Check if the checkbox alignment on the form page is proper or not.
- Check if the label for the checkbox is properly aligned.
- Check if the multiple checkboxes can be selected or not.
- Check if the checkboxes selected one at a time or multiple at a time are as per the requirement of the application.
- Check if the corresponding data is selected by the database based on the selection.
- Check if the validation controls enabled or triggered if no user action is done on the choices.
- Verify if the selection control is inactive when the page is loaded.
- Verify if the initial focus of the checkbox is on the first checkbox.
- Verify if the checboxes are placed in a order.
- Verify the physical location of the checkboxes (X.Y Coordinates, Height, Lenght, Width).
These are some of the test cases that I can think of while viewing the screenshot. You can come up with more test cases for the current scenario. I hope this post on checkbox test cases helped you. Feel free to let me know if you have any other test cases to be considered. You can also submit additional test cases in the below comments. Feel free to suggest me additional test case related questions in the comments. I’d appreciate if you share this article on social media or in forums.