一键导入
jira-task-test
Run tests for a Jira task (Playwright E2E, vitest/jest, custom) and post results to Jira. Triggers: jira-task test, run tests; 테스트 실행, E2E 테스트.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run tests for a Jira task (Playwright E2E, vitest/jest, custom) and post results to Jira. Triggers: jira-task test, run tests; 테스트 실행, E2E 테스트.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Fetch assigned high-priority Jira tasks and set up git worktrees for each (count, issue key, or natural language). Triggers: jira-task init, init sprint, setup tasks; 작업 환경 세팅, 스프린트 초기화, 할당된 작업 가져와.
Drain the initialized Jira task queue — auto + local merge per task, with base rebase between tasks. Triggers: jira-task loop; 루프 실행, 큐 소진.
Start working on a Jira task — creates a feature branch or worktree and transitions the issue to In Progress. Triggers: jira-task start, start task; 작업 시작, 태스크 시작.
Auto-execute the full Jira task workflow (start → approach → impl → test → review) sequentially. Triggers: jira-task auto, auto run; 자동 실행, 전체 워크플로 자동.
Locally merge a Jira task branch into the base branch without a remote or PR. Triggers: jira-task merge, local merge; 로컬 병합, 원격 없이 병합.
Implement a Jira task based on the approach document and post progress to Jira. Triggers: jira-task impl, implement task; 구현 시작, 코딩 시작.
| name | jira-task-test |
| description | Run tests for a Jira task (Playwright E2E, vitest/jest, custom) and post results to Jira. Triggers: jira-task test, run tests; 테스트 실행, E2E 테스트. |
| user-invocable | false |
| argument-hint | <TASK-ID> |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","mcp__atlassian__jira_get_issue","mcp__atlassian__jira_add_comment"] |
Language Rule: 프로젝트 CLAUDE.md의 Conventions 섹션 참고 (한국어 출력, Jira 코멘트 제목은 영어).
이 스킬에서 mcp__atlassian__jira_get_issue를 호출해야 하면 먼저 .jira-context.json의 cachedIssue를 확인한다 (CLAUDE.md "Issue Cache" 참고). hit이면 호출 생략. miss이면 다음 파라미터로 호출 후 cache 갱신:
fields="summary,status,issuetype"comment_limit=0Level 판정: .jira-context.json.breakdownLevel → 없으면 cachedIssue.issuetype 폴백 (approach Step 0 동일 규칙: Subtask/Task/Bug→L1, Story→L2, Epic→L3, 그 외→L1). 판정 결과를 이후 단계에서 사용.
| Level | 동작 |
|---|---|
| L1 | 경량 검증 — 핵심 동작만 확인, report 인라인/파일 생략 허용 |
| L2 | 현행 유지 — 전체 test suite 실행 + report 파일 생성 |
| L3 | child Story별 책임 — 본 스킬이 L3 Epic에서 호출되면 "child Story 단위로 실행할 것" 안내 후 조기 종료 |
Scan the project to determine the test setup:
# Check for test frameworks
ls package.json 2>/dev/null # Node.js project
ls playwright.config.* 2>/dev/null # Playwright
ls vitest.config.* 2>/dev/null # Vitest
ls jest.config.* 2>/dev/null # Jest
ls pytest.ini 2>/dev/null # Python pytest
ls pyproject.toml 2>/dev/null # Python pyproject
Also check package.json for test scripts:
cat package.json | grep -A5 '"scripts"'
Determine available test types:
playwright.config.* existsvitest.config.* or jest.config.* existspackage.json has a test script테스트 코드 작성은 본 스킬의 책임이다. impl 단계는 프로덕션 코드만 다루고 테스트 코드는 작성하지 않는다.
기존 테스트 확인:
이 태스크와 관련된 테스트가 이미 있는지 Glob/Grep으로 확인:
tests/, e2e/, __tests__/, *.test.*, *.spec.* 패턴 탐색테스트 작성 절차 (기본 동작):
__tests__/ 또는 *.test.* 등)import { test, expect } from '@playwright/test';
test.describe('<Feature Name> - <TASK-ID>', () => {
test('should <acceptance criterion 1>', async ({ page }) => {
// Test implementation
});
});
스킵 조건 (예외):
Execute tests in order of speed (unit first, then E2E):
# Vitest
npx vitest run --reporter=verbose 2>&1
# Jest
npx jest --verbose 2>&1
# pytest
python -m pytest -v 2>&1
# Install browsers if needed
npx playwright install --with-deps 2>&1
# Run all E2E tests
npx playwright test --reporter=list 2>&1
# Or run specific tests related to the task (search by TASK-ID or feature name)
npx playwright test --grep "<feature-keyword>" --reporter=list 2>&1
npm test 2>&1
Capture ALL output (stdout + stderr) for the report.
Parse the test output to extract:
For failed tests, capture:
파일 생성 없이 Jira 코멘트 인라인에 결과 요약 포함 가능. 핵심 동작 확인 결과(통과/실패/케이스 수)만 기록. docs/test/ 파일 생성은 선택 사항이며, 생략해도 워크플로를 계속 진행한다.
Create a test report at docs/test/<TASK-ID>.test-report.md.
산출물 작성 전 반드시 Read tool로 templates/test-report.template.md를 읽고 contract(필수/옵셔널 분류, 옵셔널 마커 규약)를 따른다.
Use mcp__atlassian__jira_add_comment to post the test summary:
## Test Results: <TASK-ID>
**결과**: PASS / FAIL
**날짜**: <날짜>
| 유형 | 전체 | 통과 | 실패 |
|------|-------|--------|--------|
| Unit | <n> | <n> | <n> |
| E2E (Playwright) | <n> | <n> | <n> |
### Duration
- Unit: <시간>
- E2E: <시간>
### Failed Tests
<실패한 테스트 이름 및 간단한 오류, 없으면 "없음">
전체 리포트: docs/test/<TASK-ID>.test-report.md
테스트 리포트와 실패 스크린샷을 공용 스크립트로 첨부 업로드. 스크립트 경로 결정은 Read skills/_shared/script-lookup.md 후 lookup 블록 실행:
SCRIPT_NAME="jira-attach.sh" OUT_VAR="JIRA_ATTACH_SH"
# Read skills/_shared/script-lookup.md and execute its lookup block here
# 리포트
[ -n "$JIRA_ATTACH_SH" ] && bash "$JIRA_ATTACH_SH" <TASK-ID> docs/test/<TASK-ID>.test-report.md
# Playwright 실패 스크린샷 (있을 때만)
shots=$(find test-results/ playwright-report/ -name "*.png" -type f 2>/dev/null)
[ -n "$JIRA_ATTACH_SH" ] && [ -n "$shots" ] && bash "$JIRA_ATTACH_SH" <TASK-ID> $shots
각 호출의 출력은 HTTP <code>: <file> 형식. 200이 아니면 업로드 실패 — 로컬 경로를 안내하고 계속 진행한다.
테스트 통과 시에만 skills/_shared/context-update.md 패턴으로 worktree-local + aggregate .jira-context.json을 갱신 (test는 Jira transition 없음 → STATUS="-"). 실패 시 호출하지 않는다:
SCRIPT_NAME="jira-context-update.py" OUT_VAR="JIRA_CTX_UPDATE_PY"
# Read skills/_shared/script-lookup.md and execute its lookup block here
python3 "$JIRA_CTX_UPDATE_PY" <TASK-ID> test "-" \
"<worktree>/.jira-context.json" \
"<repoRoot>/.jira-context.json"
테스트 결과에 따라 분기하여 완료 요약 출력:
테스트 통과 시:
---
✅ **Test Complete** — <TASK-ID>
- 전체: <N>개, 통과: <N>개, 실패: 0개
- 테스트 리포트: `docs/test/<TASK-ID>.test-report.md`
- Jira 코멘트 게시됨
- Jira 첨부파일: 리포트 + 스크린샷 <N>개 (또는 실패 시 로컬 경로 안내)
**Progress**: init → start → approach → impl → **test ✓** → review → merge → pr → done
**Next**: `/jira-task review <TASK-ID>` — 코드 리뷰를 실행합니다
---
테스트 실패 시:
---
⚠️ **Test Failed** — <TASK-ID>
- 전체: <N>개, 통과: <N>개, 실패: <N>개
- 실패 목록:
- <test name>: <error summary>
- 테스트 리포트: `docs/test/<TASK-ID>.test-report.md`
**Progress**: init → start → approach → impl → **test ✗** → review → merge → pr → done
**Next**: 실패 항목 수정 후 `/jira-task test <TASK-ID>` 재실행
---