Software Testing Requirements Specification
Software Testing Requirements Specification
DEPARTMENT OF SOFTWARE
ENGINEERING
TILAHUN GOITOM
……….EITM/UR170315/12
NOTE ONLY FOR THE PAYMENT FLOW IS PROVIEDED WITH DITAILED TEST CASES AND GOES ALL THE
WAY THROUGH THE STEPS FOR NOW
2. Test Strategy
3. Test Requirements
4. Test Cases
5. Test Execution
8. Appendices
8.1 Glossary
8.2 Test Data
8.3 Test Traceability Matrix
1. Introduction
This is supposed to provides the testing requirements for the Next.js-based course management
application_(PEER-COURSES), including authentication, tutorial management, course listing,
payment flow, maintains tutorial files on the cloud Cloudinary and more so that all possible
defect could be hunted based on these specifications. It also outlines the strategy,
test cases, environment, and defect management approach to ensure that the application functions
as intended and meets user needs.
The project allows users to browse, purchase, and view tutorials in various courses and generate
thier own to the course they payed for or say joined to . Users can unlock course content through
Stripe payments, and course-related materials are managed and displayed on the front end. The
authentication is managed by Clerk, and the backend uses Mongoose and MongoDB Atlas for
data storage.
1.4 References
Stripe Documentation
Clerk Authentication
Next.js Documentation
1.5 Overview
This resource bases and outlines the testing strategies, tools, and test cases required to ensure the
successful functionality and quality of the Next.js-based, PEER-COURSE project.
2. Test Strategy
. 2 signup 3 payment 4 course fecher 5 tutorial adder 6 listing tutorial 7 unlocking course
Tests will be designed around the user stories and features of the application. Each test will
include:
Test Name
Test Description
Pre-conditions
Test Steps
Expected Results
3. Test Requirements
Login: Ensure users can log in through Clerk using Google or custom login.
Course Listing: Verify courses are displayed, with appropriate data such as course title,
image, and payment amount.
Tutorial Listing: Ensure tutorials related to a course are displayed correctly, with links
to content URLs.
Unlock Course: Verify that users can unlock a course after a successful Stripe payment.
Stripe Payment Flow: Test the entire payment process, including success and failure
paths
Authenticating with clerk which will handle sign-up, session .
Security: Test that sensitive user data, such as payment information, is properly
encrypted and not exposed.
Performance: Ensure pages load quickly, and the system can handle a large number of
concurrent users.
Clerk Authentication: Ensure Clerk integrates correctly with the app and provides user
data when needed.
MongoDB and Mongoose: Test that data is saved, retrieved, and updated correctly in
MongoDB.
Stripe: Ensure the payment process works with Stripe, including refund functionality.
Usability: Ensure the system is intuitive for users to sign in, browse courses, and unlock
content.
Functionality: Ensure that all features, like viewing tutorials and purchasing courses,
work as expected.
4. Test Cases
Test Case 8: Verify that users can unlock a course after a successful payment.
Test Case 9: Verify that failed payments are handled correctly (e.g., showing an error
message).
Test Case 10: Verify that API errors (e.g., failed fetch) are handled gracefully.
Test Case 11: Verify that missing content or courses displays appropriate error messages.
Test Case 12: Verify that the homepage loads correctly and displays courses.
Test Case 13: Verify that course images and content display correctly.
5. Test Execution
6. Defect Management
New
Assigned
In Progress
Fixed
Closed
Defects will be reported via the project’s issue tracker (e.g., GitHub Issues, Jira) with the
following details:
Defect ID
Description
Severity
Priority
Steps to reproduce
6.3 Defect Severity and Priority
TEST CASES SAMPLE THE FIRST AND THE SECONF PRIORITAZED THE PAYMENT AND
THE AUTHENTICATION
Test Case 8: Verify that users can unlock a course after a successful payment.
Assumptions 1Test case 1 Test case 2, test case 3 test case 4 and all the necessary
test cases that depends on
Use Stripe’s provided test credit card number (Visa: 4242 4242 4242 4242
Fill in valid test details for expiration date, CVV, and ZIP code _any valid future date, 3 decimal
digits and 5 digits decimal.
Submit the payment.
Then finally log the output ( e.g successfully paid ,)
Note the above inputs fields are tests one input field at a time
The user is redirected to a confirmation page, sees a success message, and the course is marked
as unlocked and accessible.
Step4 b verfiy it return for
Test Case 9: Verify that failed payments are handled correctly (e.g., showing an error
message).
Assumption 1
Use Stripe’s provided test credit card number for declined payments (e.g., 4000 0000 0000
9995 and any other numbers other than the test numbers).
Fill in valid test details for expiration date, CVV, and ZIP code.
Submit the payment. GOTO STEP 3,4
Use Stripe’s provided test credit card number for payments (e.g., 424242442424242).
Fill in valid test details for expiration date, CVV, and ZIP code.
2 test for less than 3 digit( 21) ,more then 3 digit(83739), and non digit (hey) for CVV
3 Test for less than 5 digit(4783),more than 5 digit (589393) and non digi (zip123)t for
Assumptions:
Test Steps:
Name
Email
Unique Google ID
Expected: The process stops, and the user is returned to the sign-up page.
Test Case 2: Verify that users can log in with custom credentials
Assumptions:
Test Steps:
o Email: [email protected]
o Password: ValidPass123!
3. Submit:
2. Unregistered Email:
o Email: [email protected].
o Password: AnyPassword123!.
o Expected: Error displayed (e.g., "Account not found.").
3. Incorrect Password:
o Email: [email protected].
o Password: WrongPass456!.
o Expected: Error displayed (e.g., "Invalid credentials.").
4. Short Password:
o Email: [email protected].
o Password: 123 (less than 8 characters).
o Expected: Error displayed (e.g., "Password must be at least 8 characters long.").
5. Empty Fields:
o Email: (empty).
o Password: (empty).
o Expected: Error displayed (e.g., "Email and password are required.").
Test Case 3: Verify that only authenticated users can access courses
Assumptions:
The application uses session-based or token-based authentication to restrict access to courses.
Test Steps:
o Open the application and try to view the course list or a specific course while logged
out.
o Expected:
Assumptions:
Test Steps:
o Attempt to register multiple accounts using the same email address but different cases
(e.g., [email protected] and [email protected]).
o Expected:
Test
Invalid Test Expected
Requirement Case Test Steps Valid Test Data
Data Behavior
ID
Navigate to
User redirected to
the sign-up
home, record
page, select Test Google
Disabled account, created in DB,
Users can sign "Continue account:
TC-1 canceled sign-up success toast
up with Google with Google," [email protected]
midway. displayed; invalid
and om
sign-up shows
authenticate
error messages.
successfully.
Redirect to login
for unauthorized
Attempt to
access;
access
Only Valid login Attempt access authenticated
courses
authenticated credentials (via while logged out users see
TC-3 without
users can access Google or custom or with tampered paid/unlocked
logging in,
courses email/password). session token. courses and
log in, and
locked courses
retry access.
with "Unlock"
buttons.
details, and
displays a
confirm the
other invalid confirmation;
success of
details. invalid payments
unlocking a
show errors.
course.
Course remains
Attempt Invalid Stripe test
locked, error
payment with cards, invalid
message shown to
Failed payments invalid CVV (e.g., 21,
the user, and
handled TC-9 details and N/A hey), invalid ZIP
failed payment
correctly confirm the (e.g., 1234,
entry logged in
system zip123), invalid
the Stripe
response. expiration date.
dashboard.
Verify
password
Attempt duplicate
storage in Passwords stored
email
DB, test Valid user data securely (hashes),
registration,
User data is duplicate ([email protected] duplicate email
same email with
stored securely TC-4 email om, password registration is
different cases
and validated prevention, hashed with prevented, and
(e.g.,
and case- bcrypt). email validation is
[email protected]
insensitive case-insensitive.
om).
email
handling.
Test Data
Input Field Valid Test Data Invalid Test Data Expected Behavior
System invalidates
the token, redirects
Tampered session
Auth Token Valid session token to login, and displays
token or expired token.
an appropriate error
message.