Radio buttons are very important components of a web page for getting the user responses. If these will not work properly then user entered data can be lost. I am going to share one of my experience of testing radio buttons with one general question.
Are you Indian?
For testing this question I have verified following test cases:
-Without selecting any option click on Next button(If nothing is selected by default)
-Select “Yes” option and click on Next button.
-Select “No” option and click on Next button.
-Select “Yes” option and double click on Next button
-Select “No” option and double click on Next button
-Select “Yes” option ,click on Next button and then click on back browser button and verify the selected option
-Select “No” option, click on Next button and then click on back browser button and verify the selected option.
There were more than 30 questions in the form and only this question had radio button options. While testing this question I have faced one issue. User responses were saved in the db for all other questions but responses were not saved for this radio button type Question . From the front end I have not faced any issue but in DB responses were not there. What could be the reason?
I was curious to know the reason of this bug. After investigation Developer found that the data type of this column was ‘tinyint(1)’ and the code was written to accept “Yes” and “No” values in this column due to that this issue was happening. The requirement was if User has selected “Yes” then “1” should be stored in Db and If user has selected “No” then ‘0’ should be stored in DB and If user has not selected anything then nothing should be stored in DB. In place of storing ‘1’ and ‘0’ it was trying to save ‘Yes’ and ‘No’.
This was the minor mistake but the impact of this issue was very critical which could result in the data loss of the client.
The most important lesson which I learnt after this was to always verify the entered data in the DB if testers have access to DB otherwise verify all the front end places where the entered data will display or where this entered data will be used or where this entered data will impact the Application.
Please share your views and experiences and bugs related to radio buttons .
No comments:
Post a Comment