API Test Case Documentation
API Test Case Documentation
Submitted by:
Jan ‘25 - Team 43
Name Roll Number
N SENTHILKUMAR 21f1006434
Submitted on:
19/03/2025
These tests validate the endpoints related to user authentication, including registration and
login.
Endpoint: /auth/login
Method: POST
Test Cases
● Inputs:
{
"email": "[email protected]",
"password": "password"
}
● Expected Output:
○ Status Code: 200
● JSON Response:
{
"access_token": "<generated_token>",
"user_info": {
"id": "<user_id>",
"name": "Test Student",
"email": "[email protected]",
"roles": ["Student"]
}
}
● Inputs:
{
"email": "invalid-email",
"password": "password123"
}
● Expected Output:
○ Status Code: 400
JSON Response:
{
"message": "Invalid email format"
}
These tests validate the endpoints related to assignments, including fetching and submitting
assignments.
Endpoint: /assignments/course/{course_id}
Method: GET
Test Cases
response = client.get("/assignments/course/CS101")
Endpoint: /chat/start
Method: POST
Test Cases
● Expected Output:
○ Status Code: 200
○ JSON Response:
{
"chat_id": "12345",
"message": "Hello!"
}
● Inputs: {}
● Expected Output:
○ Status Code: 400
○ JSON Response:
{
These tests validate the endpoints related to courses, including fetching course details.
Endpoint: /courses/{id}
Method: GET
Test Cases