Date range Test Objectives
One of the common elements on many user interfaces is a date field or date range field. There are many #TestObjectives for such elements, but as its such common element it’s often not included in the requirements specification, or at least not detailed in full. It might have high level statements like; date must not be in the future or perhaps end date must not be before the start date.
While those very specific requirements needs of course to be tested, there are still many other common #TestObjectives that are equally valid. Those might not be captured in requirements but because your target audience has prior expectations those are definitely worth testing for.
Consider the following simple date range selection.
Well commonly there isn’t 29 days in February, except on Leap years. Year 2016 happens to be the next leap year. So even if you don’t have a specific requirement to support Leap years , your average customer would expect it to work.
For example; Consider an online reservation system and scenario where your customer wants to book an appointment on Monday the 29th Feb 2016. It would not be a very nice customer experience if the system would thrown an error saying that day is an invalid date.
And if you start to think of this bit further, there is actually rather many #TestObjectives you can test in that simple day range element. Those can be positive or negative tests, few examples:
So next time you are about to start test design for anything related to dates do consider if these #TestObjectives are applicable.
Similarly do also note that there is even more #TestObjectives when more features have been added to support date selection, commonly date selectors have a pop-up gadget which in turn gives you more #TestObjectives.
Further more, if the range also includes hours and minutes (or even seconds / milliseconds) this adds yet another set of items to test. Did you for example know there can be positive and negative leap seconds?
And finally, do also remember there are multiple different calendars in use, Gregorian is the most commonly used but certainly not the only one.
Write your answer below in the comments section
Resources & References:
Wikipedia – List of Clendars
Time and Date – Leap Year
Definitely a valid date/time due to leap second on June 2016.