Requirements:
There is a page with an age field which conceptually can only enter ages 2 to 12, how do you test the age column? And write the valid and the invalid test scenario
Objective:
To validate the age field in the passenger registration form, ensuring that users (passengers) can only enter ages between 2 to 12 years. The system should handle age validation based on the birthdate and reject any ages outside this range, as well as properly handle transitions for birthdays.
Preconditions:
- User is on the passenger registration page with the Age field visible.
- The Age field is empty when the page is first loaded.
- The system is ready to validate the age input and provide feedback (error messages for invalid inputs).
- The system ensures that users entering an age outside the valid range (2 to 12 years) cannot proceed with the registration.
Test Data:
| Field |
Valid Input Example |
Invalid Input Example |
| Age |
2, 3, 11, 12 |
1, 13, 15, -5, null, 😊, abc |
Valid Test Scenarios
3.1 Age Field Acceptance (Exact 2 years old)
- Precondition: The passenger is registering for a flight, and their age is exactly 2 years. The birthdate is 29th December 2020.
- Action: As a passenger, I should be able to register with 2 years as my age and proceed with the registration.
- Expected Result: The system accepts the age and allows the user to continue the registration process.