In this article, we discuss test cases for Dialog Box. Basically we are going to check both functional and non functional scenarios under which we are going to test the dialog box. You can take the below context of the test cases for the interview or for your work. But you may have to adjust accordingly considering the one I have presented below are more of generic and context specific test scenarios.
What is a dialog box?
Dialog boxes are like popup notifications. They have specific purpose which is often short term. Let’s say you have choice for the form and wish to notify the user before using the same. In such case you can make use of the dialog box and let the user make the choice. Also you can use the same for letting the user decide if the choice made by them is reasonable. So basically dialog boxes are used in such scenarios.
Note: I assume that you have an application under test in which you have access to the dialog box. If not, just download Visual Studio community edition. And then create one sample WinForm application and add the dialogbox component on that form. When you execute this application, you have to fire up the event through button or some other way and invoke the dialog box. So I assume you have done at-least this process on your own before you can assume the test scenarios for the dialog box.
Take a look at the Dialog box image shown below.
Let’s assume the test scenarios and cases for this dialog box. As you can see the dialog box shown here is from the Notepad functionality here the dialog box is promoting user to take action so let’s consider that scenario and form some test cases based on this test scenario.
Here are some of the test cases for dialog box.
- Does this dialog box has any typos?
- Does this dialog box appears after specific event being triggered?
- Does the display of this dialog box based on event at right location?
- Does the display of this dialog box based on the event at right instance?
- Does the dialog box offers option to save user data?
- Does the dialog box offers the option to discard action being triggered?
- Does the dialog box has minimize button? if yes, is it working?
- Does the dialog box has maximize button? if yes, is it working?
- Does the dialog box has close button? if yes, is it working?
- Does the dialog box locks the user into taking action only specific to the dialog box while working with application?
- Does the dialog box gets higher priority on windows over other application?
- Does the dialog box resizes itself?
- Does it allow the system tray or taskbar background operation while user works on dialog box?
- Does the dialog box has any localization context?
- Does the dialog box has any content properly placed?
- Does the cancellation of the dialog box takes the control back to the place where the event was triggered?
- Does the text content in the dialog box has any typos?
- Is there any input parameter in the dialog box?
- Is the input parameter in the dialog box goes to database?
- Is the input parameter in the dialog box goes to local files?
- Does the dialog box designed as per the specification of size, shape and color in the document?
- Does the dialog box appears each time the event is triggered as per the specification?
- Does the buttons in the dialog box appear as expected?
- Does the actions on the dialog box return the output as expected?
- Does the dialog box lags if there are too many background applications?
- Does the dialog box hangs if the events triggered too fast?
- Does the dialog box has any impact on the system?
- Does the dialog box works on all browsers (if it’s browser specific application)?
- Does the dialog box works on all operating system (if it’s cross platform application)?
- Does the dialog box content makes sense to the user?
These are some of the test cases I can think of right off the bat. Though there are many other scenrios you can think of and consider working on if you have any specific dialog box related to say desktop or the web based application. Do let me know if you have any specific test cases missed by me. You may also want to try out other dialog boxes that can be helpful for you to test out your scenario, or the scenario asked by your interviewer.
I hope you find these test cases useful. If you have any other test cases and suggestions in mind then feel free to suggest in the comments. I’d appreciate if you share the post on social media.