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.
Complete testing strategy for the full-stack application.
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
cd frontend
pnpm test # Run frontend tests
pnpm test:watch # Run in watch mode
pnpm test:coverage # Generate coverage report
make check-backend # Run basedpyright on backend
make check-frontend # Run TypeScript type checking
make check-all # Run all checks (backend + frontend)
make lint-backend # Ruff check and format Python
make lint-frontend # ESLint for TypeScript/React
Before writing code: Understand existing test patterns
conftest.pyWhile writing code: Run related tests frequently
uv run pytest tests/test_myfeature.py -v
After code changes: Run full test suite
make test
make check-all
Before committing: Ensure all checks pass
make check-all # Type checking + linting for both platforms
make test # Backend tests
backend/tests/backend/tests/conftest.pytest_*.py or *_test.pymake testmanageros_testpostgresql://postgres:postgres@localhost:5433/manageros_testimport 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": "test@example.com", "name": "Test User"}
)
assert response.status_code == 201
data = response.json()
assert data["email"] == "test@example.com"
AsyncClient fixture for HTTP requestsRead the error message carefully
Run single test with verbose output
uv run pytest tests/test_file.py::test_name -vv
Use print debugging or breakpoints
import pdb; pdb.set_trace() # Add breakpoint
Check test fixtures and setup
conftest.pyUse the /check-all skill or run:
make check-all # Runs all type checking and linting
make test # Runs backend test suite
This ensures: