[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EMBKC3X4Z84XYJ4YAMG14C":3,"skill-same:01M6EMBKC3X4Z84XYJ4YAMG14C":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6EMBKC3X4Z84XYJ4YAMG14C","api-testing",null,"Use when writing tests for backend APIs or frontend flows.\nTriggers for: unit tests, integration tests, E2E tests, pytest fixtures,\nTestClient setup, mock data factories, or test coverage analysis.\nNOT for: testing business logic that doesn't involve API endpoints.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fapi-testing\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"api testing","api","testing","coverage","unit","mock","triggers","tests","pytest","test coverage","use","business","analysis","e2e","data","e2e tests","coverage analysis","integration tests","writing","frontend","2026-11-10 10:12:30",false,"---\nname: api-testing\ndescription: |\n  Use when writing tests for backend APIs or frontend flows.\n  Triggers for: unit tests, integration tests, E2E tests, pytest fixtures,\n  TestClient setup, mock data factories, or test coverage analysis.\n  NOT for: testing business logic that doesn't involve API endpoints.\n---\n\n# API Testing Skill\n\nExpert testing for FastAPI backends and React\u002FNext.js frontends with unit, integration, and E2E test patterns.\n\n## Quick Reference\n\n| Test Type | Tool | Purpose | Scope |\n|-----------|------|---------|-------|\n| Unit | pytest | Pure functions, services | Isolated |\n| Integration | pytest + TestClient | DB + auth + routes | Combined |\n| E2E | Playwright\u002FCypress | Browser flows | Full stack |\n\n## Project Structure\n\n```\nbackend\u002F\n├── tests\u002F\n│   ├── __init__.py\n│   ├── conftest.py              # Shared fixtures\n│   ├── unit\u002F\n│   │   ├── test_services.py     # Business logic tests\n│   │   └── test_utils.py        # Utility function tests\n│   ├── integration\u002F\n│   │   ├── test_students.py     # Student API tests\n│   │   ├── test_fees.py         # Fee API tests\n│   │   └── test_auth.py         # Authentication tests\n│   └── fixtures\u002F\n│       ├── students.json        # Test data\n│       └── users.json\nfrontend\u002F\n├── e2e\u002F\n│   ├── specs\u002F\n│   │   ├── student.spec.ts\n│   │   └── fee.spec.ts\n│   ├── pages\u002F\n│   │   ├── DashboardPage.ts\n│   │   └── StudentPage.ts\n│   └── utils\u002F\n│       └── test-data.ts\n└── playwright.config.ts\n```\n\n## Backend: Pytest Setup\n\n### conftest.py (Shared Fixtures)\n\n```python\n# backend\u002Ftests\u002Fconftest.py\nimport pytest\nfrom typing import Generator\nfrom fastapi.testclient import TestClient\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy.pool import StaticPool\nfrom app.main import app\nfrom app.db.database import get_db, Base\nfrom app.models import User, Student\nfrom app.auth.jwt import create_access_token\nfrom passlib.context import CryptContext\n\n\n# Test database setup\nSQLALCHEMY_DATABASE_URL = \"sqlite:\u002F\u002F\u002F:memory:\"\nengine = create_engine(\n    SQLALCHEMY_DATABASE_URL,\n    connect_args={\"check_same_thread\": False},\n    poolclass=StaticPool,\n)\nTestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\n\n\n@pytest.fixture(scope=\"function\")\ndef db_session():\n    \"\"\"Create a fresh database for each test.\"\"\"\n    Base.metadata.create_all(bind=engine)\n    session = TestingSessionLocal()\n    try:\n        yield session\n    finally:\n        session.close()\n        Base.metadata.drop_all(bind=engine)\n\n\n@pytest.fixture(scope=\"function\")\ndef client(db_session):\n    \"\"\"Create a test client with database override.\"\"\"\n\n    def override_get_db():\n        try:\n            yield db_session\n        finally:\n            pass\n\n    app.dependency_overrides[get_db] = override_get_db\n    with TestClient(app) as test_client:\n        yield test_client\n    app.dependency_overrides.clear()\n\n\n@pytest.fixture\ndef test_user(db_session):\n    \"\"\"Create a test user.\"\"\"\n    pwd_context = CryptContext(schemes=[\"bcrypt\"], deprecated=\"auto\")\n    hashed_password = pwd_context.hash(\"testpassword123\")\n\n    user = User(\n        email=\"test@example.com\",\n        hashed_password=hashed_password,\n        full_name=\"Test User\",\n        is_active=True,\n    )\n    db_session.add(user)\n    db_session.commit()\n    db_session.refresh(user)\n    return user\n\n\n@pytest.fixture\ndef auth_token(test_user):\n    \"\"\"Generate JWT token for test user.\"\"\"\n    return create_access_token(data={\"sub\": test_user.email, \"roles\": [\"admin\"]})\n\n\n@pytest.fixture\ndef auth_headers(auth_token):\n    \"\"\"Headers with authentication token.\"\"\"\n    return {\"Authorization\": f\"Bearer {auth_token}\"}\n```\n\n### Unit Tests (Pure Functions)\n\n```python\n# backend\u002Ftests\u002Funit\u002Ftest_services.py\nimport pytest\nfrom app.services.fee_calculator import calculate_fee, FeeCalculationError\n\n\nclass TestCalculateFee:\n    \"\"\"Unit tests for fee calculation logic.\"\"\"\n\n    def test_basic_fee_calculation(self):\n        \"\"\"Test basic fee calculation without discounts.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=False,\n            is_new_student=False,\n        )\n        assert result == 1000.00\n\n    def test_sibling_discount(self):\n        \"\"\"Test 10% sibling discount.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=True,\n            is_new_student=False,\n        )\n        assert result == 900.00\n\n    def test_new_student_discount(self):\n        \"\"\"Test 15% new student discount.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=False,\n            is_new_student=True,\n        )\n        assert result == 850.00\n\n    def test_combined_discounts(self):\n        \"\"\"Test combined sibling and new student discounts.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=True,\n            is_new_student=True,\n        )\n        # 10% + 15% = 25% discount\n        assert result == 750.00\n\n    def test_invalid_base_amount(self):\n        \"\"\"Test that negative amounts raise error.\"\"\"\n        with pytest.raises(FeeCalculationError):\n            calculate_fee(\n                base_amount=-100.00,\n                grade_level=9,\n                has_sibling_discount=False,\n                is_new_student=False,\n            )\n\n    def test_grade_level_multipliers(self):\n        \"\"\"Test different grade level multipliers.\"\"\"\n        # Elementary (1-5): 1.0x\n        assert calculate_fee(1000.00, grade_level=3) == 1000.00\n        # Middle (6-8): 1.1x\n        assert calculate_fee(1000.00, grade_level=7) == 1100.00\n        # High (9-12): 1.2x\n        assert calculate_fee(1000.00, grade_level=10) == 1200.00\n```\n\n### Integration Tests (API Endpoints)\n\n```python\n# backend\u002Ftests\u002Fintegration\u002Ftest_students.py\nimport pytest\nfrom fastapi import status\n\n\nclass TestStudentEndpoints:\n    \"\"\"Integration tests for student CRUD endpoints.\"\"\"\n\n    @pytest.fixture\n    def create_student_payload(self):\n        \"\"\"Sample student creation payload.\"\"\"\n        return {\n            \"first_name\": \"John\",\n            \"last_name\": \"Doe\",\n            \"email\": \"john.doe@test.edu\",\n            \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n            \"grade_level\": 9,\n        }\n\n    def test_create_student_success(self, client, auth_headers, create_student_payload):\n        \"\"\"Test successful student creation.\"\"\"\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_201_CREATED\n        data = response.json()\n        assert data[\"first_name\"] == \"John\"\n        assert data[\"last_name\"] == \"Doe\"\n        assert \"id\" in data\n        assert data[\"is_active\"] is True\n\n    def test_create_student_unauthorized(self, client, create_student_payload):\n        \"\"\"Test that unauthenticated requests are rejected.\"\"\"\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n        )\n        assert response.status_code == status.HTTP_401_UNAUTHORIZED\n\n    def test_create_student_invalid_email(self, client, auth_headers, create_student_payload):\n        \"\"\"Test validation error for invalid email.\"\"\"\n        payload = {**create_student_payload, \"email\": \"invalid-email\"}\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY\n\n    def test_create_student_missing_required_field(self, client, auth_headers):\n        \"\"\"Test validation error for missing required field.\"\"\"\n        payload = {\n            \"first_name\": \"John\",\n            # Missing last_name, email, date_of_birth, grade_level\n        }\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY\n\n    def test_get_student_success(self, client, auth_headers, create_student_payload):\n        \"\"\"Test retrieving a student by ID.\"\"\"\n        # Create student first\n        create_response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        student_id = create_response.json()[\"id\"]\n\n        # Retrieve student\n        response = client.get(\n            f\"\u002Fapi\u002Fv1\u002Fstudents\u002F{student_id}\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_200_OK\n        assert response.json()[\"id\"] == student_id\n\n    def test_get_student_not_found(self, client, auth_headers):\n        \"\"\"Test 404 for non-existent student.\"\"\"\n        response = client.get(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F99999\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_404_NOT_FOUND\n\n    def test_list_students_pagination(self, client, auth_headers, db_session):\n        \"\"\"Test student list with pagination.\"\"\"\n        # Create multiple students\n        for i in range(5):\n            payload = {\n                \"first_name\": f\"Student{i}\",\n                \"last_name\": \"Test\",\n                \"email\": f\"student{i}@test.edu\",\n                \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n                \"grade_level\": 9,\n            }\n            client.post(\"\u002Fapi\u002Fv1\u002Fstudents\u002F\", json=payload, headers=auth_headers)\n\n        # Get first page\n        response = client.get(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F?skip=0&limit=3\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_200_OK\n        data = response.json()\n        assert len(data[\"data\"]) == 3\n        assert data[\"total\"] == 5\n        assert data[\"has_more\"] is True\n\n    def test_update_student(self, client, auth_headers, create_student_payload):\n        \"\"\"Test partial update of student.\"\"\"\n        # Create student\n        create_response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        student_id = create_response.json()[\"id\"]\n\n        # Update student\n        update_payload = {\"first_name\": \"Jane\", \"grade_level\": 10}\n        response = client.patch(\n            f\"\u002Fapi\u002Fv1\u002Fstudents\u002F{student_id}\",\n            json=update_payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_200_OK\n        data = response.json()\n        assert data[\"first_name\"] == \"Jane\"\n        assert data[\"grade_level\"] == 10\n\n    def test_delete_student(self, client, auth_headers, create_student_payload):\n        \"\"\"Test soft delete of student.\"\"\"\n        # Create student\n        create_response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        student_id = create_response.json()[\"id\"]\n\n        # Delete student\n        response = client.delete(\n            f\"\u002Fapi\u002Fv1\u002Fstudents\u002F{student_id}\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_204_NO_CONTENT\n\n        # Verify student is not in active list\n        list_response = client.get(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            headers=auth_headers,\n        )\n        student_ids = [s[\"id\"] for s in list_response.json()[\"data\"]]\n        assert student_id not in student_ids\n```\n\n### Test Fixtures (JSON Data)\n\n```json\n\u002F\u002F backend\u002Ftests\u002Ffixtures\u002Fstudents.json\n{\n  \"valid_student\": {\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"email\": \"john.doe@test.edu\",\n    \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n    \"grade_level\": 9\n  },\n  \"invalid_students\": [\n    {\n      \"description\": \"Missing first_name\",\n      \"data\": {\n        \"last_name\": \"Doe\",\n        \"email\": \"test@test.edu\",\n        \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n        \"grade_level\": 9\n      }\n    },\n    {\n      \"description\": \"Invalid email format\",\n      \"data\": {\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"not-an-email\",\n        \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n        \"grade_level\": 9\n      }\n    },\n    {\n      \"description\": \"Grade level out of range\",\n      \"data\": {\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"test@test.edu\",\n        \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n        \"grade_level\": 15\n      }\n    }\n  ]\n}\n```\n\n## Frontend: E2E Tests (Playwright)\n\n### playwright.config.ts\n\n```typescript\n\u002F\u002F frontend\u002Fplaywright.config.ts\nimport { defineConfig, devices } from \"@playwright\u002Ftest\";\n\nexport default defineConfig({\n  testDir: \".\u002Fe2e\u002Fspecs\",\n  fullyParallel: true,\n  forbidOnly: !!process.env.CI,\n  retries: process.env.CI ? 2 : 0,\n  workers: process.env.CI ? 1 : undefined,\n  reporter: \"html\",\n  use: {\n    baseURL: \"http:\u002F\u002Flocalhost:3000\",\n    trace: \"on-first-retry\",\n  },\n  projects: [\n    {\n      name: \"chromium\",\n      use: { ...devices[\"Desktop Chrome\"] },\n    },\n    {\n      name: \"firefox\",\n      use: { ...devices[\"Desktop Firefox\"] },\n    },\n    {\n      name: \"webkit\",\n      use: { ...devices[\"Desktop Safari\"] },\n    },\n  ],\n  webServer: {\n    command: \"npm run dev\",\n    url: \"http:\u002F\u002Flocalhost:3000\",\n    reuseExistingServer: !process.env.CI,\n  },\n});\n```\n\n### E2E Test Specification\n\n```typescript\n\u002F\u002F frontend\u002Fe2e\u002Fspecs\u002Fstudent.spec.ts\nimport { test, expect } from \"@playwright\u002Ftest\";\n\ntest.describe(\"Student Management\", () => {\n  test.beforeEach(async ({ page }) => {\n    \u002F\u002F Navigate to login page\n    await page.goto(\"\u002Flogin\");\n\n    \u002F\u002F Login as admin\n    await page.fill('input[name=\"email\"]', \"admin@test.edu\");\n    await page.fill('input[name=\"password\"]', \"adminpassword\");\n    await page.click('button[type=\"submit\"]');\n\n    \u002F\u002F Verify login success\n    await expect(page).toHaveURL(\u002F\\\u002Fdashboard\u002F);\n    await expect(page.locator(\"text=Admin\")).toBeVisible();\n  });\n\n  test(\"should create a new student successfully\", async ({ page }) => {\n    \u002F\u002F Navigate to students page\n    await page.click('a[href=\"\u002Fstudents\"]');\n    await expect(page).toHaveURL(\u002F\\\u002Fstudents\u002F);\n\n    \u002F\u002F Click add student button\n    await page.click('button:has-text(\"Add Student\")');\n\n    \u002F\u002F Fill in student form\n    await page.fill('input[name=\"firstName\"]', \"John\");\n    await page.fill('input[name=\"lastName\"]', \"Doe\");\n    await page.fill('input[name=\"email\"]', \"john.doe@test.edu\");\n    await page.fill('input[name=\"dateOfBirth\"]', \"2008-05-15\");\n\n    \u002F\u002F Select grade level\n    await page.selectOption('select[name=\"gradeLevel\"]', \"9\");\n\n    \u002F\u002F Submit form\n    await page.click('button:has-text(\"Create\")');\n\n    \u002F\u002F Verify student was created\n    await expect(page.locator(\"text=Student created successfully\")).toBeVisible();\n\n    \u002F\u002F Verify student appears in list\n    await expect(page.locator(\"text=John Doe\")).toBeVisible();\n  });\n\n  test(\"should show validation errors for invalid input\", async ({ page }) => {\n    await page.click('a[href=\"\u002Fstudents\"]');\n    await page.click('button:has-text(\"Add Student\")');\n\n    \u002F\u002F Submit empty form\n    await page.click('button:has-text(\"Create\")');\n\n    \u002F\u002F Verify validation errors\n    await expect(page.locator(\"text=First name is required\")).toBeVisible();\n    await expect(page.locator(\"text=Last name is required\")).toBeVisible();\n    await expect(page.locator(\"text=Invalid email address\")).toBeVisible();\n  });\n\n  test(\"should filter students by grade level\", async ({ page }) => {\n    await page.click('a[href=\"\u002Fstudents\"]');\n\n    \u002F\u002F Filter by grade 9\n    await page.selectOption('select[name=\"gradeFilter\"]', \"9\");\n    await page.click('button:has-text(\"Apply\")');\n\n    \u002F\u002F Verify only grade 9 students shown\n    const rows = page.locator(\"table.student-list tbody tr\");\n    await expect(rows).toHaveCount(3); \u002F\u002F Assuming 3 grade 9 students\n  });\n\n  test(\"should view student details\", async ({ page }) => {\n    await page.click('a[href=\"\u002Fstudents\"]');\n\n    \u002F\u002F Click on first student\n    await page.click('table.student-list tbody tr:first-child a');\n\n    \u002F\u002F Verify details page\n    await expect(page).toHaveURL(\u002F\\\u002Fstudents\\\u002F\\d+\u002F);\n    await expect(page.locator(\"h1\")).toContainText(\"Student Details\");\n  });\n});\n```\n\n### Page Object Model\n\n```typescript\n\u002F\u002F frontend\u002Fe2e\u002Fpages\u002FStudentsPage.ts\nimport { Page, Locator, expect } from \"@playwright\u002Ftest\";\n\nexport class StudentsPage {\n  readonly page: Page;\n  readonly addButton: Locator;\n  readonly studentTable: Locator;\n  readonly gradeFilter: Locator;\n  readonly searchInput: Locator;\n\n  constructor(page: Page) {\n    this.page = page;\n    this.addButton = page.locator('button:has-text(\"Add Student\")');\n    this.studentTable = page.locator(\"table.student-list\");\n    this.gradeFilter = page.locator('select[name=\"gradeFilter\"]');\n    this.searchInput = page.locator('input[name=\"search\"]');\n  }\n\n  async goto() {\n    await this.page.goto(\"\u002Fstudents\");\n  }\n\n  async createStudent(data: {\n    firstName: string;\n    lastName: string;\n    email: string;\n    gradeLevel: string;\n    dateOfBirth?: string;\n  }) {\n    await this.addButton.click();\n    await this.page.fill('input[name=\"firstName\"]', data.firstName);\n    await this.page.fill('input[name=\"lastName\"]', data.lastName);\n    await this.page.fill('input[name=\"email\"]', data.email);\n    await this.page.selectOption('select[name=\"gradeLevel\"]', data.gradeLevel);\n    if (data.dateOfBirth) {\n      await this.page.fill('input[name=\"dateOfBirth\"]', data.dateOfBirth);\n    }\n    await this.page.click('button:has-text(\"Create\")');\n  }\n\n  async getStudentNames(): Promise\u003Cstring[]> {\n    const rows = this.studentTable.locator(\"tbody tr\");\n    const names: string[] = [];\n    for (const row of await rows.all()) {\n      names.push(await row.locator(\"td:first-child\").textContent());\n    }\n    return names;\n  }\n\n  async filterByGrade(grade: string) {\n    await this.gradeFilter.selectOption(grade);\n    await this.page.click('button:has-text(\"Apply\")');\n  }\n\n  async searchByName(name: string) {\n    await this.searchInput.fill(name);\n    await this.page.keyboard.press(\"Enter\");\n  }\n}\n```\n\n## Test Pyramid\n\n```\n        \u002F\\\n       \u002F  \\      E2E Tests (10%)\n      \u002F    \\     - Critical user journeys\n     \u002F______\\\n    \u002F        \\\n   \u002F          \\   Integration Tests (30%)\n  \u002F            \\  - API endpoints with DB\n \u002F______________\\\n\u002F                \\\n\u002F                  \\ Unit Tests (60%)\n\u002F                    \\ - Services, utilities\n\u002F______________________\\\n```\n\n## Quality Checklist\n\n- [ ] **Happy path + edge cases**: Test both success and error scenarios\n- [ ] **CI compatible**: Tests run in CI pipeline without manual setup\n- [ ] **Deterministic**: No flaky tests, no random failures\n- [ ] **Coverage**: 80%+ for core modules, 90%+ for critical paths\n- [ ] **No real secrets**: Use test credentials, never production keys\n- [ ] **No production DB**: Use test database or in-memory SQLite\n- [ ] **Isolated**: Tests don't depend on each other\n- [ ] **Fast**: Unit tests \u003C 100ms, integration \u003C 1s\n\n## Running Tests\n\n```bash\n# Backend tests\npytest                           # Run all tests\npytest tests\u002Funit\u002F              # Unit tests only\npytest tests\u002Fintegration\u002F       # Integration tests only\npytest -v                       # Verbose output\npytest --cov=app               # With coverage\n\n# Frontend E2E tests\nnpx playwright install           # Install browsers\nnpx playwright test             # Run E2E tests\nnpx playwright test --reporter=line\n```\n\n## CI Configuration\n\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Tests\n\non: [push, pull_request]\n\njobs:\n  test-backend:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-python@v5\n        with:\n          python-version: \"3.11\"\n      - run: pip install -r requirements.txt\n      - run: pip install pytest pytest-cov\n      - run: pytest --cov=app --cov-report=xml\n      - uses: codecov\u002Fcodecov-action@v3\n\n  test-frontend:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: \"20\"\n      - run: npm ci\n      - run: npm run test\n      - run: npm run build\n```\n\n## Integration Points\n\n| Skill | Integration |\n|-------|-------------|\n| `@sqlmodel-crud` | Test CRUD operations with test database |\n| `@jwt-auth` | Test authenticated endpoints with test tokens |\n| `@api-route-design` | Test all CRUD routes with various status codes |\n| `@error-handling` | Test error responses and edge cases |\n| `@data-validation` | Test validation error messages |\n","# API Testing Skill\n\nExpert testing for FastAPI backends and React\u002FNext.js frontends with unit, integration, and E2E test patterns.\n\n## Quick Reference\n\n| Test Type | Tool | Purpose | Scope |\n|-----------|------|---------|-------|\n| Unit | pytest | Pure functions, services | Isolated |\n| Integration | pytest + TestClient | DB + auth + routes | Combined |\n| E2E | Playwright\u002FCypress | Browser flows | Full stack |\n\n## Project Structure\n\n```\nbackend\u002F\n├── tests\u002F\n│   ├── __init__.py\n│   ├── conftest.py              # Shared fixtures\n│   ├── unit\u002F\n│   │   ├── test_services.py     # Business logic tests\n│   │   └── test_utils.py        # Utility function tests\n│   ├── integration\u002F\n│   │   ├── test_students.py     # Student API tests\n│   │   ├── test_fees.py         # Fee API tests\n│   │   └── test_auth.py         # Authentication tests\n│   └── fixtures\u002F\n│       ├── students.json        # Test data\n│       └── users.json\nfrontend\u002F\n├── e2e\u002F\n│   ├── specs\u002F\n│   │   ├── student.spec.ts\n│   │   └── fee.spec.ts\n│   ├── pages\u002F\n│   │   ├── DashboardPage.ts\n│   │   └── StudentPage.ts\n│   └── utils\u002F\n│       └── test-data.ts\n└── playwright.config.ts\n```\n\n## Backend: Pytest Setup\n\n### conftest.py (Shared Fixtures)\n\n```python\n# backend\u002Ftests\u002Fconftest.py\nimport pytest\nfrom typing import Generator\nfrom fastapi.testclient import TestClient\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy.pool import StaticPool\nfrom app.main import app\nfrom app.db.database import get_db, Base\nfrom app.models import User, Student\nfrom app.auth.jwt import create_access_token\nfrom passlib.context import CryptContext\n\n\n# Test database setup\nSQLALCHEMY_DATABASE_URL = \"sqlite:\u002F\u002F\u002F:memory:\"\nengine = create_engine(\n    SQLALCHEMY_DATABASE_URL,\n    connect_args={\"check_same_thread\": False},\n    poolclass=StaticPool,\n)\nTestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\n\n\n@pytest.fixture(scope=\"function\")\ndef db_session():\n    \"\"\"Create a fresh database for each test.\"\"\"\n    Base.metadata.create_all(bind=engine)\n    session = TestingSessionLocal()\n    try:\n        yield session\n    finally:\n        session.close()\n        Base.metadata.drop_all(bind=engine)\n\n\n@pytest.fixture(scope=\"function\")\ndef client(db_session):\n    \"\"\"Create a test client with database override.\"\"\"\n\n    def override_get_db():\n        try:\n            yield db_session\n        finally:\n            pass\n\n    app.dependency_overrides[get_db] = override_get_db\n    with TestClient(app) as test_client:\n        yield test_client\n    app.dependency_overrides.clear()\n\n\n@pytest.fixture\ndef test_user(db_session):\n    \"\"\"Create a test user.\"\"\"\n    pwd_context = CryptContext(schemes=[\"bcrypt\"], deprecated=\"auto\")\n    hashed_password = pwd_context.hash(\"testpassword123\")\n\n    user = User(\n        email=\"test@example.com\",\n        hashed_password=hashed_password,\n        full_name=\"Test User\",\n        is_active=True,\n    )\n    db_session.add(user)\n    db_session.commit()\n    db_session.refresh(user)\n    return user\n\n\n@pytest.fixture\ndef auth_token(test_user):\n    \"\"\"Generate JWT token for test user.\"\"\"\n    return create_access_token(data={\"sub\": test_user.email, \"roles\": [\"admin\"]})\n\n\n@pytest.fixture\ndef auth_headers(auth_token):\n    \"\"\"Headers with authentication token.\"\"\"\n    return {\"Authorization\": f\"Bearer {auth_token}\"}\n```\n\n### Unit Tests (Pure Functions)\n\n```python\n# backend\u002Ftests\u002Funit\u002Ftest_services.py\nimport pytest\nfrom app.services.fee_calculator import calculate_fee, FeeCalculationError\n\n\nclass TestCalculateFee:\n    \"\"\"Unit tests for fee calculation logic.\"\"\"\n\n    def test_basic_fee_calculation(self):\n        \"\"\"Test basic fee calculation without discounts.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=False,\n            is_new_student=False,\n        )\n        assert result == 1000.00\n\n    def test_sibling_discount(self):\n        \"\"\"Test 10% sibling discount.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=True,\n            is_new_student=False,\n        )\n        assert result == 900.00\n\n    def test_new_student_discount(self):\n        \"\"\"Test 15% new student discount.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=False,\n            is_new_student=True,\n        )\n        assert result == 850.00\n\n    def test_combined_discounts(self):\n        \"\"\"Test combined sibling and new student discounts.\"\"\"\n        result = calculate_fee(\n            base_amount=1000.00,\n            grade_level=9,\n            has_sibling_discount=True,\n            is_new_student=True,\n        )\n        # 10% + 15% = 25% discount\n        assert result == 750.00\n\n    def test_invalid_base_amount(self):\n        \"\"\"Test that negative amounts raise error.\"\"\"\n        with pytest.raises(FeeCalculationError):\n            calculate_fee(\n                base_amount=-100.00,\n                grade_level=9,\n                has_sibling_discount=False,\n                is_new_student=False,\n            )\n\n    def test_grade_level_multipliers(self):\n        \"\"\"Test different grade level multipliers.\"\"\"\n        # Elementary (1-5): 1.0x\n        assert calculate_fee(1000.00, grade_level=3) == 1000.00\n        # Middle (6-8): 1.1x\n        assert calculate_fee(1000.00, grade_level=7) == 1100.00\n        # High (9-12): 1.2x\n        assert calculate_fee(1000.00, grade_level=10) == 1200.00\n```\n\n### Integration Tests (API Endpoints)\n\n```python\n# backend\u002Ftests\u002Fintegration\u002Ftest_students.py\nimport pytest\nfrom fastapi import status\n\n\nclass TestStudentEndpoints:\n    \"\"\"Integration tests for student CRUD endpoints.\"\"\"\n\n    @pytest.fixture\n    def create_student_payload(self):\n        \"\"\"Sample student creation payload.\"\"\"\n        return {\n            \"first_name\": \"John\",\n            \"last_name\": \"Doe\",\n            \"email\": \"john.doe@test.edu\",\n            \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n            \"grade_level\": 9,\n        }\n\n    def test_create_student_success(self, client, auth_headers, create_student_payload):\n        \"\"\"Test successful student creation.\"\"\"\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_201_CREATED\n        data = response.json()\n        assert data[\"first_name\"] == \"John\"\n        assert data[\"last_name\"] == \"Doe\"\n        assert \"id\" in data\n        assert data[\"is_active\"] is True\n\n    def test_create_student_unauthorized(self, client, create_student_payload):\n        \"\"\"Test that unauthenticated requests are rejected.\"\"\"\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n        )\n        assert response.status_code == status.HTTP_401_UNAUTHORIZED\n\n    def test_create_student_invalid_email(self, client, auth_headers, create_student_payload):\n        \"\"\"Test validation error for invalid email.\"\"\"\n        payload = {**create_student_payload, \"email\": \"invalid-email\"}\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY\n\n    def test_create_student_missing_required_field(self, client, auth_headers):\n        \"\"\"Test validation error for missing required field.\"\"\"\n        payload = {\n            \"first_name\": \"John\",\n            # Missing last_name, email, date_of_birth, grade_level\n        }\n        response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY\n\n    def test_get_student_success(self, client, auth_headers, create_student_payload):\n        \"\"\"Test retrieving a student by ID.\"\"\"\n        # Create student first\n        create_response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        student_id = create_response.json()[\"id\"]\n\n        # Retrieve student\n        response = client.get(\n            f\"\u002Fapi\u002Fv1\u002Fstudents\u002F{student_id}\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_200_OK\n        assert response.json()[\"id\"] == student_id\n\n    def test_get_student_not_found(self, client, auth_headers):\n        \"\"\"Test 404 for non-existent student.\"\"\"\n        response = client.get(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F99999\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_404_NOT_FOUND\n\n    def test_list_students_pagination(self, client, auth_headers, db_session):\n        \"\"\"Test student list with pagination.\"\"\"\n        # Create multiple students\n        for i in range(5):\n            payload = {\n                \"first_name\": f\"Student{i}\",\n                \"last_name\": \"Test\",\n                \"email\": f\"student{i}@test.edu\",\n                \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n                \"grade_level\": 9,\n            }\n            client.post(\"\u002Fapi\u002Fv1\u002Fstudents\u002F\", json=payload, headers=auth_headers)\n\n        # Get first page\n        response = client.get(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F?skip=0&limit=3\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_200_OK\n        data = response.json()\n        assert len(data[\"data\"]) == 3\n        assert data[\"total\"] == 5\n        assert data[\"has_more\"] is True\n\n    def test_update_student(self, client, auth_headers, create_student_payload):\n        \"\"\"Test partial update of student.\"\"\"\n        # Create student\n        create_response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        student_id = create_response.json()[\"id\"]\n\n        # Update student\n        update_payload = {\"first_name\": \"Jane\", \"grade_level\": 10}\n        response = client.patch(\n            f\"\u002Fapi\u002Fv1\u002Fstudents\u002F{student_id}\",\n            json=update_payload,\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_200_OK\n        data = response.json()\n        assert data[\"first_name\"] == \"Jane\"\n        assert data[\"grade_level\"] == 10\n\n    def test_delete_student(self, client, auth_headers, create_student_payload):\n        \"\"\"Test soft delete of student.\"\"\"\n        # Create student\n        create_response = client.post(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            json=create_student_payload,\n            headers=auth_headers,\n        )\n        student_id = create_response.json()[\"id\"]\n\n        # Delete student\n        response = client.delete(\n            f\"\u002Fapi\u002Fv1\u002Fstudents\u002F{student_id}\",\n            headers=auth_headers,\n        )\n        assert response.status_code == status.HTTP_204_NO_CONTENT\n\n        # Verify student is not in active list\n        list_response = client.get(\n            \"\u002Fapi\u002Fv1\u002Fstudents\u002F\",\n            headers=auth_headers,\n        )\n        student_ids = [s[\"id\"] for s in list_response.json()[\"data\"]]\n        assert student_id not in student_ids\n```\n\n### Test Fixtures (JSON Data)\n\n```json\n\u002F\u002F backend\u002Ftests\u002Ffixtures\u002Fstudents.json\n{\n  \"valid_student\": {\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"email\": \"john.doe@test.edu\",\n    \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n    \"grade_level\": 9\n  },\n  \"invalid_students\": [\n    {\n      \"description\": \"Missing first_name\",\n      \"data\": {\n        \"last_name\": \"Doe\",\n        \"email\": \"test@test.edu\",\n        \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n        \"grade_level\": 9\n      }\n    },\n    {\n      \"description\": \"Invalid email format\",\n      \"data\": {\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"not-an-email\",\n        \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n        \"grade_level\": 9\n      }\n    },\n    {\n      \"description\": \"Grade level out of range\",\n      \"data\": {\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"test@test.edu\",\n        \"date_of_birth\": \"2008-05-15T00:00:00Z\",\n        \"grade_level\": 15\n      }\n    }\n  ]\n}\n```\n\n## Frontend: E2E Tests (Playwright)\n\n### playwright.config.ts\n\n```typescript\n\u002F\u002F frontend\u002Fplaywright.config.ts\nimport { defineConfig, devices } from \"@playwright\u002Ftest\";\n\nexport default defineConfig({\n  testDir: \".\u002Fe2e\u002Fspecs\",\n  fullyParallel: true,\n  forbidOnly: !!process.env.CI,\n  retries: process.env.CI ? 2 : 0,\n  workers: process.env.CI ? 1 : undefined,\n  reporter: \"html\",\n  use: {\n    baseURL: \"http:\u002F\u002Flocalhost:3000\",\n    trace: \"on-first-retry\",\n  },\n  projects: [\n    {\n      name: \"chromium\",\n      use: { ...devices[\"Desktop Chrome\"] },\n    },\n    {\n      name: \"firefox\",\n      use: { ...devices[\"Desktop Firefox\"] },\n    },\n    {\n      name: \"webkit\",\n      use: { ...devices[\"Desktop Safari\"] },\n    },\n  ],\n  webServer: {\n    command: \"npm run dev\",\n    url: \"http:\u002F\u002Flocalhost:3000\",\n    reuseExistingServer: !process.env.CI,\n  },\n});\n```\n\n### E2E Test Specification\n\n```typescript\n\u002F\u002F frontend\u002Fe2e\u002Fspecs\u002Fstudent.spec.ts\nimport { test, expect } from \"@playwright\u002Ftest\";\n\ntest.describe(\"Student Management\", () => {\n  test.beforeEach(async ({ page }) => {\n    \u002F\u002F Navigate to login page\n    await page.goto(\"\u002Flogin\");\n\n    \u002F\u002F Login as admin\n    await page.fill('input[name=\"email\"]', \"admin@test.edu\");\n    await page.fill('input[name=\"password\"]', \"adminpassword\");\n    await page.click('button[type=\"submit\"]');\n\n    \u002F\u002F Verify login success\n    await expect(page).toHaveURL(\u002F\\\u002Fdashboard\u002F);\n    await expect(page.locator(\"text=Admin\")).toBeVisible();\n  });\n\n  test(\"should create a new student successfully\", async ({ page }) => {\n    \u002F\u002F Navigate to students page\n    await page.click('a[href=\"\u002Fstudents\"]');\n    await expect(page).toHaveURL(\u002F\\\u002Fstudents\u002F);\n\n    \u002F\u002F Click add student button\n    await page.click('button:has-text(\"Add Student\")');\n\n    \u002F\u002F Fill in student form\n    await page.fill('input[name=\"firstName\"]', \"John\");\n    await page.fill('input[name=\"lastName\"]', \"Doe\");\n    await page.fill('input[name=\"email\"]', \"john.doe@test.edu\");\n    await page.fill('input[name=\"dateOfBirth\"]', \"2008-05-15\");\n\n    \u002F\u002F Select grade level\n    await page.selectOption('select[name=\"gradeLevel\"]', \"9\");\n\n    \u002F\u002F Submit form\n    await page.click('button:has-text(\"Create\")');\n\n    \u002F\u002F Verify student was created\n    await expect(page.locator(\"text=Student created successfully\")).toBeVisible();\n\n    \u002F\u002F Verify student appears in list\n    await expect(page.locator(\"text=John Doe\")).toBeVisible();\n  });\n\n  test(\"should show validation errors for invalid input\", async ({ page }) => {\n    await page.click('a[href=\"\u002Fstudents\"]');\n    await page.click('button:has-text(\"Add Student\")');\n\n    \u002F\u002F Submit empty form\n    await page.click('button:has-text(\"Create\")');\n\n    \u002F\u002F Verify validation errors\n    await expect(page.locator(\"text=First name is required\")).toBeVisible();\n    await expect(page.locator(\"text=Last name is required\")).toBeVisible();\n    await expect(page.locator(\"text=Invalid email address\")).toBeVisible();\n  });\n\n  test(\"should filter students by grade level\", async ({ page }) => {\n    await page.click('a[href=\"\u002Fstudents\"]');\n\n    \u002F\u002F Filter by grade 9\n    await page.selectOption('select[name=\"gradeFilter\"]', \"9\");\n    await page.click('button:has-text(\"Apply\")');\n\n    \u002F\u002F Verify only grade 9 students shown\n    const rows = page.locator(\"table.student-list tbody tr\");\n    await expect(rows).toHaveCount(3); \u002F\u002F Assuming 3 grade 9 students\n  });\n\n  test(\"should view student details\", async ({ page }) => {\n    await page.click('a[href=\"\u002Fstudents\"]');\n\n    \u002F\u002F Click on first student\n    await page.click('table.student-list tbody tr:first-child a');\n\n    \u002F\u002F Verify details page\n    await expect(page).toHaveURL(\u002F\\\u002Fstudents\\\u002F\\d+\u002F);\n    await expect(page.locator(\"h1\")).toContainText(\"Student Details\");\n  });\n});\n```\n\n### Page Object Model\n\n```typescript\n\u002F\u002F frontend\u002Fe2e\u002Fpages\u002FStudentsPage.ts\nimport { Page, Locator, expect } from \"@playwright\u002Ftest\";\n\nexport class StudentsPage {\n  readonly page: Page;\n  readonly addButton: Locator;\n  readonly studentTable: Locator;\n  readonly gradeFilter: Locator;\n  readonly searchInput: Locator;\n\n  constructor(page: Page) {\n    this.page = page;\n    this.addButton = page.locator('button:has-text(\"Add Student\")');\n    this.studentTable = page.locator(\"table.student-list\");\n    this.gradeFilter = page.locator('select[name=\"gradeFilter\"]');\n    this.searchInput = page.locator('input[name=\"search\"]');\n  }\n\n  async goto() {\n    await this.page.goto(\"\u002Fstudents\");\n  }\n\n  async createStudent(data: {\n    firstName: string;\n    lastName: string;\n    email: string;\n    gradeLevel: string;\n    dateOfBirth?: string;\n  }) {\n    await this.addButton.click();\n    await this.page.fill('input[name=\"firstName\"]', data.firstName);\n    await this.page.fill('input[name=\"lastName\"]', data.lastName);\n    await this.page.fill('input[name=\"email\"]', data.email);\n    await this.page.selectOption('select[name=\"gradeLevel\"]', data.gradeLevel);\n    if (data.dateOfBirth) {\n      await this.page.fill('input[name=\"dateOfBirth\"]', data.dateOfBirth);\n    }\n    await this.page.click('button:has-text(\"Create\")');\n  }\n\n  async getStudentNames(): Promise\u003Cstring[]> {\n    const rows = this.studentTable.locator(\"tbody tr\");\n    const names: string[] = [];\n    for (const row of await rows.all()) {\n      names.push(await row.locator(\"td:first-child\").textContent());\n    }\n    return names;\n  }\n\n  async filterByGrade(grade: string) {\n    await this.gradeFilter.selectOption(grade);\n    await this.page.click('button:has-text(\"Apply\")');\n  }\n\n  async searchByName(name: string) {\n    await this.searchInput.fill(name);\n    await this.page.keyboard.press(\"Enter\");\n  }\n}\n```\n\n## Test Pyramid\n\n```\n        \u002F\\\n       \u002F  \\      E2E Tests (10%)\n      \u002F    \\     - Critical user journeys\n     \u002F______\\\n    \u002F        \\\n   \u002F          \\   Integration Tests (30%)\n  \u002F            \\  - API endpoints with DB\n \u002F______________\\\n\u002F                \\\n\u002F                  \\ Unit Tests (60%)\n\u002F                    \\ - Services, utilities\n\u002F______________________\\\n```\n\n## Quality Checklist\n\n- [ ] **Happy path + edge cases**: Test both success and error scenarios\n- [ ] **CI compatible**: Tests run in CI pipeline without manual setup\n- [ ] **Deterministic**: No flaky tests, no random failures\n- [ ] **Coverage**: 80%+ for core modules, 90%+ for critical paths\n- [ ] **No real secrets**: Use test credentials, never production keys\n- [ ] **No production DB**: Use test database or in-memory SQLite\n- [ ] **Isolated**: Tests don't depend on each other\n- [ ] **Fast**: Unit tests \u003C 100ms, integration \u003C 1s\n\n## Running Tests\n\n```bash\n# Backend tests\npytest                           # Run all tests\npytest tests\u002Funit\u002F              # Unit tests only\npytest tests\u002Fintegration\u002F       # Integration tests only\npytest -v                       # Verbose output\npytest --cov=app               # With coverage\n\n# Frontend E2E tests\nnpx playwright install           # Install browsers\nnpx playwright test             # Run E2E tests\nnpx playwright test --reporter=line\n```\n\n## CI Configuration\n\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Tests\n\non: [push, pull_request]\n\njobs:\n  test-backend:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-python@v5\n        with:\n          python-version: \"3.11\"\n      - run: pip install -r requirements.txt\n      - run: pip install pytest pytest-cov\n      - run: pytest --cov=app --cov-report=xml\n      - uses: codecov\u002Fcodecov-action@v3\n\n  test-frontend:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: \"20\"\n      - run: npm ci\n      - run: npm run test\n      - run: npm run build\n```\n\n## Integration Points\n\n| Skill | Integration |\n|-------|-------------|\n| `@sqlmodel-crud` | Test CRUD operations with test database |\n| `@jwt-auth` | Test authenticated endpoints with test tokens |\n| `@api-route-design` | Test all CRUD routes with various status codes |\n| `@error-handling` | Test error responses and edge cases |\n| `@data-validation` | Test validation error messages |\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fapi-testing",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill api-testing",{"tool":59,"command":60},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill api-testing",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill api-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fapi-testing\u002FSKILL.md",true,[67,73],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"scripts\u002Fverify.py","SCRIPT","脚本",1902,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fapi-testing\u002Fscripts\u002Fverify.py",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"skill-report.json","REFERENCE","参考文档",9149,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fawais68\u002Fapi-testing\u002Fskill-report.json",[80,89,98,107,113,119],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[86,87,88],"model","model hierarchy","model hierarchy skill",{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[95,96,97],"MCP","zoom","zoom mcp",{"skillNo":99,"name":100,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[104,105,106,96],"sdk","zoom apps sdk","apps",{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[109],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[115],{"skillNo":120,"name":121,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[121]]