Technology & Innovation
#TIA4
Student Registration for a Course
By Ted Cartwright • Published on Mon 18 Nov, 2024
Test the portal's "Student Registration" feature by simulating a student's course enrolment. Input sample data such as name, email, phone, state, city, referral code, and selected courses. Verify front-end validations like required fields, email and phone formats, and referral code checks. Upon submission, ensure data is correctly stored in the database (students and course_enrolments tables). Confirm success via a user message and optional email notification. Test edge cases like empty fields, invalid referral codes, and maximum course limits. Validate database integrity and session handling for smooth functionality.
Test Steps
-
Navigate to the Registration Form
- Open the portal and access the "Register for a Course" form.
-
Input Test Data: Use the following mock data to test the form:
- Full Name: John Doe
- Email: john.doe@example.com
- Phone Number: +1234567890
- Gender: Male
- State: California
- City: Los Angeles
- Referral Code: ABC123 (if applicable)
- Courses to Enroll:
- Course 1: "Introduction to Programming"
- Course 2: "Data Structures and Algorithms"
-
Submit the Form
- Click the "Submit" button.
-
Expected Front-End Validation:
- Required Fields: Ensure that required fields are validated (e.g., name, email, phone, state, city, courses).
- Email Format: If an invalid email is entered, an error should appear.
- Phone Number Format: Ensure phone number accepts only valid formats.
-
Expected Back-End Behavior:
- Data should be stored in the appropriate database tables (e.g.,
studentsandcourse_enrollments). - If the referral code is used, ensure it's validated and associated with the student.
- Data should be stored in the appropriate database tables (e.g.,
-
Success Confirmation:
- A success message should appear: “Registration Successful! Welcome to the program.”
- Optionally, an email confirmation should be sent to the student’s email address.
Additional Test Cases:
-
Edge Cases:
- Empty form submission (should trigger validation errors).
- Invalid referral code (should display “Invalid referral code” message).
- Enrolling in the maximum number of allowed courses (if any limit exists).
-
Database Validation:
- Check if the
studentstable has the record for "John Doe." - Ensure courses are correctly linked in the
course_enrollmentstable.
- Check if the
-
Session Testing:
- If the user session is stored (e.g., for progress tracking), ensure it is active after submission.
Mock Data Table for Repeated Tests
| Field | Value |
|---|---|
| Full Name | Jane Smith |
| jane.smith@example.com | |
| Phone Number | +1987654321 |
| Gender | Female |
| State | New York |
| City | New York City |
| Referral Code | XYZ789 (Optional) |
| Courses to Enroll | "Web Development" |
By using this test scenario, you’ll ensure the portal handles user input, validates it properly, and submits data to the back-end without issues. Let me know if you want me to expand or refine it further!