3

I am testing a calendar application, which allows a user to select day, month and year, but the problem is the developers have not implemented any form of date validations, which means every month can have up to 31 days.

  • The year dropdown menu has a range from 1900 to 2016,
  • the month dropdown menu has Jan, Feb ... Dec,
  • the day dropdown menu always has 1~31, regardless of which month I choose.

The testing strategy I am thinking of is:

  • choose one non-leap year and test against 29th Feb; expected to fail
  • choose one non-leap year and test against 31st April; expected to fail
  • choose one leap year and test against 29th Feb; expected to succeed
  • choose one leap year and test against 31st April; expected to fail

Four scenarios above should provide a good coverage regarding leap years.

What are your opinions? Am I missing anything?

1

In addition to

  • choose one non-leap year and test against 29th Feb; expected to fail
  • choose one non-leap year and test against 31st April; expected to fail
  • choose one leap year and test against 29th Feb; expected to succeed
  • choose one leap year and test against 31st April; expected to fail

I would consider adding more positive tests at day (time), month and year boundaries:

  • choose one non-leap year and test against 01 Jan; expected to pass
  • choose one non-leap year and test against 31 Dec; expected to pass
  • choose one non-leap year and test against 28th Feb; expected to pass
  • choose one leap year and test against 28th Feb; expected to pass
  • choose one non-leap year and test against 1st Mar; expected to pass
  • choose one non-leap year and test against 1st Feb; expected to pass
  • choose one non-leap year and test against 1st May; expected to pass
  • choose one non-leap year and test against 30th June; expected to pass
  • choose a time that is in the next or previous day GMT-wise and test at that time; expected to pass
  • Nice, nice nice. Will add more boundary tests. Thank you. @Michael Durrant – Yu Zhang Jul 17 '16 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.