Full-stack dev quiz question #11

Full-stack dev quiz question #11

quizSoftware tester's instinct is important also for full-stack developers for two reasons: testing is responsibility of such developer also and the first testing should be done by the author. The eleventh question of the quiz for a full-stack developer is here.

Check the answer to the tenth question.

 

 

A new feature was added to a web application. A part of the feature is an input for a date. It was requested that it should support one date format - DD-MM-YYYY and dates range from 01-01-1900 to 31-12-2050 inclusive. What tests would you perform for this input field to make sure it is correctly implemented? For example one of the tests would be checking if the application allows for 12-05-2006. Another one would be testing if the application correctly handles incorrect xy-05-2006.

dateField

 

For the answer scroll down

.

.

.

 

 

 

 

 

 

 

 

.

.

.

This question checks a tester's intuition. The biggest difficulty is to find all possible angles to test this part of the application. As it is an open question, there is no one correct answer. I could accept any answer that cover all or a vast majority of these cases:

Positive cases:

  • A valid date in correct format e.g. 06-11-1994.
  • An extra day in February in a leap year e.g. 28-02-1984.
  • The lowest and the greatest possible date allowed by the system: 01-01-1900 and 31-12-2050.
  •  

    Negative cases:

  • An incorrect date e.g. 32-03-2000.
  • Not allowed characters e.g. 12.09-1995, 12_09-1995, "12-09-1995.
  • An extra day in February in a not leap year e.g. 28-02-1985.
  • Dates exceeding the lowest and the greatest possible dates allowed by the system: 31-12-1989, 01-01-2051.
  • Code Injections: SQL, JavaScript etc.
  •  

    Additionally:

  • Compatibility with supported browsers.
  • Different window sizes.
  • If you like what I do, consider buying me a coffee :)

    Buy me a coffeeBuy me a coffee