| name | supertest |
| description | Use when the user wants to run tests, verify features before or after a PR,
perform QA testing, generate test reports, write test cases, or check if
changes are safe to deploy. Also trigger on: "ํ
์คํธ ํด์ค", "QA ๋๋ ค์ค",
"PR ํ
์คํธ", "test this feature", "run tests", "check for regressions".
|
SuperTest Skill
QA ์ ๋ฌธ๊ฐ์ฒ๋ผ ํ
์คํธ ๊ณํ์ ์๋ฆฝํ๊ณ , ์๋์ผ๋ก ํ
์คํธ๋ฅผ ์คํํ๋ฉฐ, HTML ๋ณด๊ณ ์๋ฅผ ์์ฑํ๋ค.
์ฝ๋ ๋ฆฌ๋ทฐ๋ ํ์ง ์๋๋ค. ํ
์คํธ ์คํ๊ณผ ๊ฒฐ๊ณผ ๋ณด๊ณ ์๋ง ์ง์คํ๋ค.
Phase 0: SUPERTEST.md ํ์ธ
๋จผ์ ์คํ:
ls SUPERTEST.md 2>/dev/null && echo "EXISTS" || echo "MISSING"
SUPERTEST.md ์กด์ฌ?
โโ EXISTS โ Read ๋๊ตฌ๋ก SUPERTEST.md๋ฅผ ์ฝ๊ธฐ โ Phase 1๋ก ์งํ
โโ MISSING + ๋ํํ โ **REQUIRED:** init.md ์ง์นจ์ ๋ฐ๋ผ ์ธํฐ๋ทฐ ์งํ โ SUPERTEST.md ์์ฑ โ Phase 1
โโ MISSING + ๋น๋ํํ โ ์ปจํ
์คํธ ์๋ ๊ฐ์ง๋ง์ผ๋ก Phase 1 ์งํ
๋น๋ํํ ํ๊ฒฝ ํ๋จ:
if [ ! -t 0 ] || [ -n "${CI}${GITHUB_ACTIONS}${GITLAB_CI}" ]; then
echo "NON_INTERACTIVE"
else
echo "INTERACTIVE"
fi
TTY๊ฐ ์๊ฑฐ๋ CI=true, GITHUB_ACTIONS, GITLAB_CI ์ค ํ๋๋ผ๋ ์ค์ ๋์ด ์์ผ๋ฉด ๋น๋ํํ์ผ๋ก ์ฒ๋ฆฌํ๋ค.
๋น๋ํํ ์๋ ๊ฐ์ง ์์:
cat package.json 2>/dev/null | grep -E '"test":|jest|vitest|mocha'
ls pytest.ini pyproject.toml setup.cfg 2>/dev/null
ls playwright.config.* cypress.config.* 2>/dev/null
grep -r "BASE_URL\|API_URL\|localhost" .env .env.local 2>/dev/null | head -5
git remote -v | grep -E "github|gitlab"
Phase 1: ์ปจํ
์คํธ ๋ถ์
PR ๊ฐ์ง:
gh pr view --json number,files 2>/dev/null
git log --oneline -1
git diff --name-only HEAD~1 HEAD 2>/dev/null || git diff --name-only origin/main...HEAD 2>/dev/null
PR์ด ์์ผ๋ฉด ๋ณ๊ฒฝ ํ์ผ์ ๋ถ๋ฅํ๋ค. PR์ด ์์ผ๋ฉด ์ฌ์ฉ์์๊ฒ ํ
์คํธํ ๊ธฐ๋ฅ์ ์ง๋ฌธํ๋ค
(๋น๋ํํ์ด๋ฉด ์ ์ฒด ํ๋ก์ ํธ ์ค์บ).
๋ณ๊ฒฝ ๋ถ๋ฅ ๊ท์น:
| ๋ถ๋ฅ | ๊ฐ์ง ๊ฒฝ๋ก/ํจํด | ์คํํ ํ
์คํธ |
|---|
| API ๋ณ๊ฒฝ | routes/, controllers/, *.api.*, handler | ๋จ์ + API ํธ์ถ |
| UI ๋ณ๊ฒฝ | components/, pages/, *.tsx, *.vue, *.svelte | ๋จ์ + E2E |
| ๋ก์ง ๋ณ๊ฒฝ | services/, utils/, lib/, helpers/ | ๋จ์ + ํตํฉ |
| ์ค์ ๋ณ๊ฒฝ | *.config.*, .env*, Dockerfile | ์ฐ๊ธฐ (ํ๊ฒฝ ์์กด) |
| ๋ณตํฉ ๋ณ๊ฒฝ | ์ 2๊ฐ์ง ์ด์ | ์ ์ฒด ์กฐํฉ |
๋ชจ๋
ธ๋ฆฌํฌ์ธ ๊ฒฝ์ฐ, ๋ณ๊ฒฝ ํ์ผ์ ๊ฒฝ๋ก prefix๋ก ํด๋น ์ํฌ์คํ์ด์ค๋ฅผ ๋งคํํ์ฌ ์ํฌ์คํ์ด์ค๋ณ๋ก ๋ถ๋ฅํ๋ค.
Phase 2: ํ
์คํธ ๊ณํ ์๋ฆฝ
REQUIRED: tc-strategy.md ์ง์นจ์ ์ฝ๊ณ TC๋ฅผ ์์ฑํ๋ค.
- SUPERTEST.md์
level ๊ธฐ์ค์ผ๋ก TC ์ ์กฐ์ :
minimal: ์ฃผ์ GREEN CASE๋ง (๊ธฐ๋ฅ๋น 1~2๊ฐ)
standard: GREEN + ์ฃผ์ EDGE CASE (๊ธฐ๋ฅ๋น 3~5๊ฐ, ๊ธฐ๋ณธ๊ฐ)
thorough: GREEN + ์ ์ฒด EDGE CASE + ๊ฒฝ๊ณ๊ฐ (๊ธฐ๋ฅ๋น 5~10๊ฐ)
- TC ์์ฑ ์๋ฃ ํ REQUIRED: html-templates.md๋ฅผ ์ฝ๊ณ
plan-report.html ์์ฑ
๋ณด๊ณ ์ ๋ฐ ์ํฐํฉํธ ์ ์ฅ ๊ฒฝ๋ก:
REPORT_DIR=".supertest/$(date +%Y-%m-%d_%H-%M)"
START_TIME=$(date +%s)
mkdir -p "$REPORT_DIR/logs"
mkdir -p "$REPORT_DIR/screenshots"
mkdir -p "$REPORT_DIR/scripts"
Phase 3: ํ
์คํธ ์คํ
์คํ ์์: ๋จ์/ํตํฉ โ API โ E2E
๋จ์/ํตํฉ:
<unit_command> 2>&1 | tee "$REPORT_DIR/logs/unit.log"
API ํ
์คํธ (auth_method: bearer ์์):
TOKEN=$(printenv "$AUTH_TOKEN_ENV")
curl -s -w "\n%{http_code}" \
-H "Authorization: Bearer $TOKEN" \
"$API_BASE_URL/endpoint" \
2>&1 | tee "$REPORT_DIR/logs/api-TC-001.log"
E2E:
npx playwright test --reporter=json \
--screenshot=only-on-failure \
--output="$REPORT_DIR/screenshots" \
2>&1 | tee "$REPORT_DIR/logs/e2e.log"
npx cypress run --reporter json \
--config screenshotsFolder="$REPORT_DIR/screenshots",videosFolder="$REPORT_DIR/screenshots" \
2>&1 | tee "$REPORT_DIR/logs/e2e.log"
์์ ์คํฌ๋ฆฝํธ ์ ์ฅ ๊ท์น:
- ํ
์คํธ ์ค ์์ฑํ๋ curl ๋ช
๋ น, ๊ฒ์ฆ ์คํฌ๋ฆฝํธ, seed ์คํฌ๋ฆฝํธ๋
$REPORT_DIR/scripts/ ์ ์ ์ฅ
- ํ์ผ๋ช
ํ์:
{TC๋ฒํธ}-{๋ชฉ์ }.sh (์: TC-003-create-user.sh, TC-007-seed-data.sh)
๊ฐ TC ์คํ ๊ฒฐ๊ณผ๋ฅผ ๊ธฐ๋ก:
- PASS: ์์ ๊ฒฐ๊ณผ ์ผ์น
- FAIL: ์๋ฌ ๋ฉ์์ง ์บก์ฒ + ์์ธ ์ถ์ + ๊ด๋ จ ๋ก๊ทธ ๊ฒฝ๋ก ๊ธฐ๋ก
- SKIP: ์คํ ํ๊ฒฝ ๋ถ์กฑ (์ธ์ฆ ์ ๋ณด ์์, E2E ์ค์ ์์ ๋ฑ)
Phase 3 ์๋ฃ ํ ์์ ์๊ฐ ๊ณ์ฐ:
DURATION=$(( $(date +%s) - START_TIME ))s
Phase 4: ๋ณด๊ณ ์ ์์ฑ
REQUIRED: html-templates.md๋ฅผ ์ฝ๊ณ ๋ณด๊ณ ์๋ฅผ ์์ฑํ๋ค.
PR ์ฝ๋ฉํธ (์กฐ๊ฑด: PR ์์ + SUPERTEST.md pr_comment.enabled: true):
REQUIRED: pr-comment.md๋ฅผ ์ฝ๊ณ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ค.
PR_NUM=$(gh pr view --json number -q .number 2>/dev/null)
gh pr comment "$PR_NUM" --body "$(cat <<'COMMENT'
{pr-comment.md์ ํด๋น format ํ
ํ๋ฆฟ ๋ด์ฉ}
COMMENT
)"
์๋ฃ ํ ์ฌ์ฉ์์๊ฒ ๋ณด๊ณ ์ ๊ฒฝ๋ก๋ฅผ ์๋ฆฐ๋ค:
ํ
์คํธ ์๋ฃ.
- ๊ณํ์: .supertest/2026-04-27_14-30/plan-report.html
- ๊ฒฐ๊ณผ: .supertest/2026-04-27_14-30/result-report.html
- ์์ฝ: .supertest/2026-04-27_14-30/executive-summary.html
- ๋ก๊ทธ: .supertest/2026-04-27_14-30/logs/
- ์คํฌ๋ฆฐ์ท: .supertest/2026-04-27_14-30/screenshots/ (E2E ์คํจ ์บก์ฒ)
- ์คํฌ๋ฆฝํธ: .supertest/2026-04-27_14-30/scripts/