Run the backend test suite correctly — working directory, Docker requirement, single-test vs full-suite commands. Use when running or writing backend tests in apps/backend.
Scanned 9/3/2026
Install to Claude Code
npx -y skills add rhesis-ai/rhesis --skill backend-testing --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Backend Testing?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/rhesis-ai-backend-testing)More formats (shields.io, HTML) on the badges page.
---
name: backend-testing
description: Run the backend test suite correctly — working directory, Docker requirement, single-test vs full-suite commands. Use when running or writing backend tests in apps/backend.
---
# Backend Testing
**Ask the user before running the whole backend suite.** It takes a very long time. Default to
the narrowest selection that covers the change (single test, class, or file); only run
`../../tests/backend/` in full once the user says to.
Backend tests must run from `apps/backend` — its `pyproject.toml` sets
`testpaths = ["../../tests/backend"]` and `pythonpath = ["src"]`, so paths/imports only resolve
from that directory. Never run `uv run pytest tests/backend/...` from the repo root.
A fresh worktree has no `apps/backend/.venv`, and a plain `uv sync` is not enough — `rhesis-sdk`
sits behind the `all` extra and `rhesis.backend.ee` behind `ee`, so the tests fail with
`ModuleNotFoundError` on those imports. Sync both extras once per worktree.
```bash
cd apps/backend
uv sync --extra all --extra ee # once per worktree
uv run pytest ../../tests/backend/ -v
# single test class:
uv run pytest ../../tests/backend/services/explorer/test_tests.py::TestCreateExplorerTestSet -v
```
Backend tests need Docker running — `tests/backend/conftest.py` starts an ephemeral Postgres and
Redis container per pytest-xdist worker via Testcontainers (see
`tests/backend/testcontainers_setup.py`), no manual setup needed. If tests fail with connection or
container errors, stop and ask the user to start Docker instead of trying to work around it or
debug the test code.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!