Command Palette

Search for a command to run...

Назад к скиллам
скилл № 83387

test-acceptance

Run acceptance tests (backend API, frontend UI, or load suite). Use when user wants to run E2E acceptance tests or mentions /test-acceptance command.

БесплатноБез исполняемых скриптов
rakovi4от rakovi4★ 54 звезды на GitHub

Установить test-acceptance в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Run Acceptance Tests

Pre-Checks

Read ports from infrastructure/.env and verify required services are up before running tests.

Backend (always required)

Check the health endpoint (see technology.md Conventions table for path):

source infrastructure/.env && curl -s -o /dev/null -w "%{http_code}" http://localhost:$BACKEND_PORT{health_endpoint} 2>/dev/null || echo "UNAVAILABLE"
  • 200 → OK.
  • UNAVAILABLE or non-200 → execute the named run-backend skill first. Wait for startup.

Frontend (required when argument is frontend or a frontend test class)

source infrastructure/.env && curl -s -o /dev/null -w "%{http_code}" http://localhost:$FRONTEND_PORT 2>/dev/null || echo "UNAVAILABLE"
  • 200 → OK.
  • UNAVAILABLE or non-200 → execute the named run-frontend skill first. Wait for startup.

Load (required when argument is load)

Load tests run only against a backend booted from the pre-baked Standard Load Baseline image (docker-compose.load.yml) — never a dev backend. Two pre-checks are required — both must pass before launching the suite. The health endpoint alone is not enough: a dev backend started by run-backend also returns 200 from /actuator/health while having an empty DB, and the load suite will then fail every test with confusing HttpClientErrorException 401s at the login step. Catch this upfront with a baseline-login probe.

Step 1 — health check (same path as Backend above):

source infrastructure/.env && curl -s -o /dev/null -w "%{http_code}" http://localhost:$BACKEND_PORT{health_endpoint} 2>/dev/null || echo "UNAVAILABLE"
  • 200 → proceed to Step 2.
  • UNAVAILABLE or non-200 → ERROR and STOP. Do NOT start the backend via run-backend. A backend started by run-backend has an empty DB; load tests would silently produce meaningless results. The load backend must be booted from the baked baseline image — point the user to infrastructure/load-baseline/README.md ("Wiring load tests to the baked image").

Step 2 — baked-baseline DB probe. Confirm the running Postgres container for this repo instance is the baked baseline image. (A raw-curl login probe is unreliable: the application's CSRF filter blocks unauthenticated POSTs to /api/v1/auth/login with 403 before any DB lookup, so a login attempt cannot distinguish baked vs dev DB. Probe the DB container directly.)

source infrastructure/.env && docker ps --filter "name=postgres-container-$REPO_INDEX" --format '{{.Image}}' 2>/dev/null
  • Output starts with the project's load-baseline image name (e.g., load-baseline-postgres:) → baked baseline DB confirmed, proceed to run the suite.
  • Output empty (no container running for this repo index) → ERROR and STOP. No Postgres container is running for this repo index. Point the user to infrastructure/load-baseline/README.md ("Wiring load tests to the baked image").
  • Output is a non-baseline image (e.g., postgres:16) → ERROR and STOP. The Postgres container for this repo index is the dev image, not the baked baseline. Load tests would fail every login with HttpClientErrorException 401 against an empty DB. Tell the user the container needs to be swapped to the baked baseline via the compose flow in infrastructure/load-baseline/README.md. Do NOT swap the container yourself.

Never report "Backend healthy, launching load suite" after Step 1 alone. A green Step 1 with a red Step 2 is exactly the dev-backend-with-empty-DB trap that 15 ceiling-failure errors looked like before the probe was added.

Action

Run via script (loads ports from .env).

infrastructure/scripts/test-acceptance.sh

With arguments:

  • backend → runs all backendTest
  • backend {ClassName} → runs only backendTest --tests "*{ClassName}*"
  • frontend → runs all frontendTest
  • frontend {ClassName} → runs only frontendTest --tests "*{ClassName}*"
  • load → runs all loadTest (requires the baked-baseline backend — see Load pre-check)
  • load {ClassName} → runs only loadTest --tests "*{ClassName}*"
  • {ClassName} → runs test --tests "*{ClassName}*"
  • (no args) → runs all tests

Always pass the test class name when running a specific test — never run the full suite just to check one test. The full suite takes ~14 minutes.

Execution Strategy

Read .claude/guidelines/tdd-rules.md and follow its "Stop on first failure" protocol:

  1. Launch as a persistent command: retain its pollable session or output identifier. Store SEEN=0 to track lines already shown.
  2. Poll with separate shell calls: Make repeated individual shell calls (NOT a loop inside one call — that hides output until the loop finishes). Each call checks for new lines and the terminal signal:
    TOTAL=$(wc -l < "$OUTPUT" 2>/dev/null || echo 0) && sed -n "$((SEEN+1)),${TOTAL}p" "$OUTPUT" | grep -E "PASSED|FAILED|> Task|tests completed|BUILD|Results:|Tests run:" ; grep -c -E "BUILD SUCCESSFU
    
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл test-acceptance?

Run acceptance tests (backend API, frontend UI, or load suite). Use when user wants to run E2E acceptance tests or mentions /test-acceptance command.

Как установить скилл test-acceptance?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл test-acceptance запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить test-acceptance с