Below there are some Test Case samples that I wrote while working on my graduation project at Wantsome applying the techniques and testing types learned, on booking application for the register page.
TC01 Description: Landing Page - Register button Precondition: For unregistered users
Steps to reproduce:
- Open the site : http://138.68.69.185
- Find the "Register" button on the top of the right side of the page.
- Click on "Register" button.
Expected results: Being redirected on the register page.
TC02 Description: Register Page -Verify elements Precondition: For unregistered users
Steps to reproduce:
- Open the site : http://138.68.69.185/register
- Check the elements of the page: There are two sections : ''Login information'' (Top of the page) & '' Personal information'' (Bottom of the page) and there are two buttons ''Register'' & ''Cancel''.
- [Login information] Check if every field is mandatory or optional
- [Login information] Check if the following field is displayed : First Name.
- [Login information] Check if the following field is displayed under the First Name : Last Name.
- [Login information] Check if the following field is displayed under the Last Name : Email.
- [Login information] Check if the following field is displayed under the Email : Password.
- [Login information] Check if the following field is displayed under the Password : Confirm Password.
- [Personal information] Check if every field is mandatory or optional.
- [Personal information] Check if the following field is a dropdown : Country.
- [Personal information] Check if the following field is a text field : City.
- [Personal information] Check if the following field is a text field : Address 1.
- [Personal information] Check if the following field is a text field : Address 2.
- [Personal information] Check if the following field is a date picker field : Date of Birth.
- [Personal information] Check if the following field is a dropdown : Gender.
- [Personal information] Check if the following is a text field: Nationality.
- Check if under the register form, two buttons appear: "Register" above and "Cancel" under.
Expected results: All the fields are displayed.
TC03 Description: Check if the account is not created if at least one mandatory field from Login information is not completed. Precondition: The Register page is open.
Steps to reproduce:
- Leave empty one of the mandatory fields.
- Complete the rest of the mandatory fields.
- Click on the Register button.
Expected results: An error message is displayed. The error message is: “[Name of the field] should not be empty”. Where [Name of the field] is related to each empty mandatory field.
Test Data: First name : Test Last name: Name Email: TestEmail@test.com Password: TestPassword123! Confirm Password: TestPassword123!
TC04 Description: Check if the account is created if the field 'Date of birth' in Personal information section is not completed. Precondition: The Register page is open. All the mandatory fields in the Login information section are completed.
Steps to reproduce:
- Leave empty 'Date of birth' field.
- Click on Register button.
Expected results: An error message is displayed. The error message is: "You must complete this mandatory field."
TC05 Description: Check if the account is created if the email doesn't have a validation of type {text}@{text}.{text} Precondition: The Register page is open. All the mandatory fields are completed except the email field.
Steps to reproduce:
- Enter an invalid email address in the email field.
- Click on Register button.
Expected results: An error message is displayed. The error message is: "You must provide a valid email address."
Test Data: TestNametest.com
TC06 Description: Check if the account is created when the password doesn't meet one of the validations required. Precondition: The Register page is open. All the mandatory fields are completed except the password field.
Steps to reproduce:
- Complete the password field with the following test data.
- Click on Register button
Expected results: An error message is displayed. The error message is: "Your password must contain at least 8 characters, one uppercase letter, one lowercase letter, one number and one special character."
Test Data: at least 7 characters; no uppercase letter; no one lowercase letter; no number; no special character.
TC07 Description: Check if the user can create the account if is under 18 years old. Precondition: The Register page is open. All the mandatory fields are correctly completed ( First Name, Last Name, Email, Password and Confirm Password) except 'Date of birth' field.
Steps to reproduce:
- Pick a date of birth under 18 years old.
- Click on Register button.
Expected results: A message will appear. The message is: “You have to be over 18 years in order to create an account”.
Test Data: 12.05.2007 10.01.2002
TC08 Description: Check if the account is created when the confirm password doesn't match with the password Precondition: The Register page is open. All the mandatory fields are completed except the password and re-type password field.
Steps to reproduce:
- Complete the password field with test data.
- Complete the re-type password field with test data
- Click on Register button
Expected results: An error message is displayed. The error message is: "Your passwords must match"
Test Data: TestPassword123! TestPassword123
TC09 Description: Check if the account is created when all mandatory fields are completed Precondition: The Register page is open.
Steps to reproduce:
- Complete "First name" field with test data.
- Complete "Last name" field with test data.
- Complete "E-mail" field with test data.
- Complete "Password" field with test data.
- Complete "Confirm password" field with test data.
- Pick a date from the "Date of birth" picker using test data.
- Click on "Register" button form the bottom of the page.
- The user is redirected to the ‘Login’ page.
Expected results: The account is created. The "Login" page is open.
Test Data: First name : Test Last name: Name Email: TestEmail@test.com Password: TestPassword123! Confirm Password: TestPassword123! Date of birth: 12.01.2000
TC10 Description: Check if 'Cancel' button works by redirecting the user to the page they navigated from Precondition: The Register page is open.
Steps to reproduce:
- Complete all the mandatory fields with valid data.
- Complete some of the optional fields.
- Click on 'Cancel' button under the Register form.
Expected results: The user is redirected to the page they navigated from.
Test Data: First Name: Test Last Name: Name Email: TestEmail@test.com Password: TestPassword123! Re-type password: TestPassword123! Date of birth: 12.05.2000 Country: Romania City: Bacau Gender: I prefer not to tell