{"id":23,"date":"2015-02-15T21:14:27","date_gmt":"2015-02-15T21:14:27","guid":{"rendered":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/?p=23"},"modified":"2015-03-18T20:19:24","modified_gmt":"2015-03-18T20:19:24","slug":"for-dates","status":"publish","type":"post","link":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/for-dates\/","title":{"rendered":"Test Objectives for Dates and Date Ranges"},"content":{"rendered":"<h1>Date range Test Objectives<\/h1>\n<p>One of the common elements on many user interfaces is a <b>date field<\/b> or <b>date range field<\/b>. There are many #TestObjectives for such elements, but as its such common element it&#8217;s often not included in the requirements specification, or at least not detailed in full. It might have high level statements like;\u00a0<i>date must not be in the future <\/i>or perhaps <i>end date must not be before the start date<\/i>.<\/p>\n<p>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.<\/p>\n<p>Consider the following simple date range selection.<br \/>\n<img loading=\"lazy\" class=\"aligncenter size-full wp-image-34\" src=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/LeapYear-wide.png\" alt=\"Leap Year example\" width=\"393\" height=\"99\" srcset=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/LeapYear-wide.png 393w, http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/LeapYear-wide-300x76.png 300w\" sizes=\"(max-width: 393px) 100vw, 393px\" \/>Well commonly there isn&#8217;t 29 days in February, except on Leap years. Year 2016 happens to be the next leap year. So even if you don&#8217;t have a specific requirement to support Leap years , your average customer would expect it to work.<\/p>\n<p><b><i>For example;<\/i><\/b> 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.<br \/>\n<img loading=\"lazy\" class=\"aligncenter wp-image-26 size-full\" src=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/date_error.png\" alt=\"Example error from badly tested data range\" width=\"411\" height=\"28\" srcset=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/date_error.png 411w, http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/date_error-300x20.png 300w\" sizes=\"(max-width: 411px) 100vw, 411px\" \/><\/p>\n<p>And if you start to think of this bit further, there is actually rather many\u00a0#TestObjectives you can test in that simple day range element. Those can be positive or negative tests, few examples:<br \/>\n<img loading=\"lazy\" class=\" wp-image-27 size-full aligncenter\" src=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/example_date_range.png\" alt=\"Example Test Objectives for Dates\" width=\"450\" height=\"405\" srcset=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/example_date_range.png 450w, http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/example_date_range-300x270.png 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><br \/>\nSo next time you are about to start test design for anything related to dates do consider if these #TestObjectives are applicable.<\/p>\n<p>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\u00a0#TestObjectives.<\/p>\n<p>Further more, if the\u00a0range 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 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Leap_second\" target=\"_blank\" data-blogger-escaped-rel=\"nofollow\" data-blogger-escaped-target=\"_blank\">leap seconds<\/a>?<\/p>\n<p style=\"text-align: left;\">And finally, do also remember there are multiple different calendars in use,\u00a0Gregorian is the most commonly used but certainly not the only one.<br \/>\n<img loading=\"lazy\" class=\"alignnone wp-image-30 size-full\" src=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/trivia_box_wide.png\" alt=\"Trivia - Date range\" width=\"505\" height=\"57\" srcset=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/trivia_box_wide.png 505w, http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/trivia_box_wide-300x34.png 300w\" sizes=\"(max-width: 505px) 100vw, 505px\" \/><br \/>\nWrite your answer below in the comments section<\/p>\n<p>Need more information?<br \/>\n<a href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/top_ebook\"><img loading=\"lazy\" class=\"alignleft size-full wp-image-291\" src=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/02\/cmd_click_to_read_more.jpg\" alt=\"Click to Read More\" width=\"280\" height=\"46\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><b> Resources &amp; References:<br \/>\n<\/b><a href=\"http:\/\/en.wikipedia.org\/wiki\/List_of_calendars\" data-blogger-escaped-rel=\"nofollow\" data-blogger-escaped-target=\"_blank\">Wikipedia &#8211; List of Clendars<br \/>\n<\/a><a href=\"https:\/\/www.timeanddate.com\/date\/leapyear.html\" data-blogger-escaped-rel=\"nofollow\" data-blogger-escaped-target=\"_blank\">Time and Date &#8211; Leap Year<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Software testers writing test objectives for date and date ranges should consider these samples and test strategies. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[20,11,7],"_links":{"self":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":12,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":292,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts\/23\/revisions\/292"}],"wp:attachment":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}