Skip to content

Instantly share code, notes, and snippets.

@minhphong306
Created January 21, 2026 07:07
Show Gist options
  • Select an option

  • Save minhphong306/b1c571a1bc0471753d120bf7e302325a to your computer and use it in GitHub Desktop.

Select an option

Save minhphong306/b1c571a1bc0471753d120bf7e302325a to your computer and use it in GitHub Desktop.
Test case.md

API Test Case

Test Case Information

  • Test Case ID: TC_API_[MODULE]_[NUMBER]
  • Test Case Name: [Descriptive name]
  • Module/Feature: [Feature name]
  • API Endpoint: [Endpoint path]
  • HTTP Method: [GET/POST/PUT/DELETE/PATCH]
  • Priority: [Critical/High/Medium/Low]
  • Type: [Functional/Security/Performance/Integration]
  • Created By: [Tester name]
  • Created Date: [DD/MM/YYYY]
  • Last Updated: [DD/MM/YYYY]

Description

[Mô tả chi tiết mục đích của test case]

Pre-conditions

  • Condition 1
  • Condition 2
  • Condition 3

Test Environment

Request Details

Endpoint

[METHOD] /api/v1/[resource]

Headers

Content-Type: application/json Authorization: Bearer {token} Accept: application/json

Query Parameters

?param1=value1&param2=value2

Path Parameters

/api/v1/users/{user_id}

Request Body

{
  "field1": "value1",
  "field2": "value2"
}

Test Data

Valid Data:

  • field1: "valid_value"
  • field2: "valid_value"

Invalid Data:

  • field1: "invalid_value"
  • field2: null

Test Steps

[Step 1]

[Step 2]

[Step 3]

Expected Result

Status Code

[Expected HTTP status code]

Response Body

{ "expected": "response", "structure": "here" }

Response Headers

Content-Type: application/json X-Custom-Header: value

Response Time < [time] ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment