smithery/Plabrum

test-workflow

Automated testing workflow for backend and frontend. Use when writing tests, fixing test failures, or validating code changes. Runs pytest for backend and jest/vitest for frontend.

Installation

$ npx skills add smithery/Plabrum --skill test-workflow

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,432 B
  • docs SUMMARY.md 201 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Testing Workflow

Complete testing strategy for the full-stack application.

When to use this skill

  • After making code changes
  • Before creating pull requests
  • Fixing test failures
  • Writing new test cases
  • Validating bug fixes

Quick Commands

Backend Testing

make test                    # Run all backend tests
make test-watch              # Run tests in watch mode (if available)
uv run pytest tests/         # Run specific test directory
uv run pytest tests/test_auth.py  # Run specific test file
uv run pytest tests/test_auth.py::test_login  # Run specific test
uv run pytest -v             # Verbose output
uv run pytest --lf           # Run last failed tests
uv run pytest -x             # Stop on first failure

Frontend Testing

cd frontend
pnpm test                    # Run frontend tests
pnpm test:watch              # Run in watch mode
pnpm test:coverage           # Generate coverage report

Type Checking

make check-backend           # Run basedpyright on backend
make check-frontend          # Run TypeScript type checking
make check-all               # Run all checks (backend + frontend)

Linting

make lint-backend            # Ruff check and format Python
make lint-frontend           # ESLint for TypeScript/React

Testing Workflow Steps

  1. Before writing code: Understand existing test patterns

- Look at similar test files - Check test fixtures in conftest.py - Review test database setup

  1. While writing code: Run related tests frequently

``bash uv run pytest tests/test_myfeature.py -v ``

  1. After code changes: Run full test suite

``bash make test make check-all ``

  1. Before committing: Ensure all checks pass

``bash make check-all # Type checking + linting for both platforms make test # Backend tests ``

Test Structure

Backend Tests (pytest + asyncio)

  • Location: backend/tests/
  • Fixtures: backend/tests/conftest.py
  • Pattern: test.py or test.py
  • Run with: make test

Test Database

  • Uses separate test database: manageros_test
  • Auto-created and migrated in test fixtures
  • Isolated from development database
  • Connection string: postgresql://postgres:postgres@localhost:5433/manageros_test

Writing Backend Tests

import pytest
from httpx import AsyncClient

@pytest.mark.asyncio
async def test_create_user(client: AsyncClient) -> None:
    """Test user creation endpoint."""
    response = await client.post(
        "/api/users",
        json={"email": "[email protected]", "name": "Test User"}
    )
    assert response.status_code == 201
    data = response.json()
    assert data["email"] == "[email protected]"

Common Test Patterns

Testing API Endpoints

  1. Use AsyncClient fixture for HTTP requests
  2. Test success cases (200, 201, 204)
  3. Test error cases (400, 401, 403, 404)
  4. Verify response schemas
  5. Check database state changes

Testing Database Operations

  1. Use test database fixtures
  2. Test CRUD operations
  3. Verify relationships and constraints
  4. Test RLS policies (row-level security)
  5. Clean up test data

Testing Background Tasks

  1. Import task functions directly
  2. Mock external dependencies
  3. Test task logic independently
  4. Verify task enqueueing

Debugging Failed Tests

  1. Read the error message carefully

- Check assertion failures - Look at stack traces - Review test data

  1. Run single test with verbose output

``bash uv run pytest tests/testfile.py::testname -vv ``

  1. Use print debugging or breakpoints

``python import pdb; pdb.set_trace() # Add breakpoint ``

  1. Check test fixtures and setup

- Review conftest.py - Verify test database state - Check fixture dependencies

Pre-Release Checklist

Use the /check-all skill or run:

make check-all  # Runs all type checking and linting
make test       # Runs backend test suite

This ensures:

  • Backend type checking passes (basedpyright)
  • Frontend type checking passes (TypeScript)
  • Backend linting passes (ruff)
  • Frontend linting passes (ESLint)
  • All backend tests pass (pytest)