In this post, I’m covering test cases for radio button. In previous article, I’ve covered checkbox test cases and had request to cover the radio button test case.
Radio buttons are used on the forms or websites where user is supposed to make a single choice. Unlike checkboxes where you can have multiple choice, radio box leaves you with single option. So most of the forms collect data where the accuracy of information is decided based on the radio box selection. Often the wrong selection could lead to skewed data. If the radio button leads to wrong options even after proper selection, the form output or the application under test could result in faulty performance. So this is one more reason why radio buttons should be checked with care despite their easy to test appearance.
The form in the screenshot has two radio buttons that require certain response from the user. We are going to use the current form in the screenshot for our test cases. If you have any other additional questions for the radio button options then free to add it and see how many test cases that you can come up with. For the sake of simplicity just follow the screenshot below for the test cases.
Test cases for Radio Button
- Check if the radio control button gets selected using mouse cursor action or TAB keyboard key selection.
- Check the alignment of the radio button control on the form.
- Check if the multiple radio button on the form get selected or not.
- Check the CSS style of the radio button is as per the specification.
- Check the CSS size of the radio button is as per the specification.
- Check the CSS color of the radio button is as per the specification.
- Click the radio control button and see if the page gets redirected to the next page.
- Dont click on the radio buttons and see if clicking on the submit button generates warning “to make a choice” is shown or not.
- Click on ‘Yes’ radio button control and hit submit to see if it redirects to the specific page.
- Click on ‘No’ radio button control and hit submit to see if it redirects to the specific page.
- Check if the user response of Yes is saved in the right database column.
- Check if the user responsse of No is saved in the right datbase column.
- Check if the database gets updated with either radio control choice being made.
You can come up with few more additional options based on the form radio buttons used with questions. I hope that the test cases listed here are helpful for your use. If you have any other test case suggestions and questions then I’d appreciate the additional information in the comments. Feel free to let me know your views on my series of posts on test cases. If you wish to write gues post on the test cases then I’d appreciate that as well. Please do share the post on social media if you have found it helpful 🙂