원클릭으로
test
Run or write tests for a file/dir/function.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Run or write tests for a file/dir/function.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | test |
| description | Run or write tests for a file/dir/function. |
| effort | medium |
| context | inline |
Auto-detect test framework, run existing tests, generate missing ones.
Check active task (if any):
.tausik/tausik task list --status active
If active → .tausik/tausik task show {slug} → extract role, stack.
Load role profile: Read harness/roles/{role}.md — follow the role's /test modifiers.
Load stack guide: Read harness/stacks/{stack}.md — use the stack's testing section for framework, fixtures, patterns.
Use stack guide if loaded. Otherwise scan project root for signals:
pytest.ini, conftest.py, pyproject.toml [tool.pytest] → pytestjest.config.*, package.json[jest] → jestvitest.config.* → vitest*.test.go → go test$ARGUMENTS = "run" or empty → run all tests$ARGUMENTS = file/directory → run tests for that scope$ARGUMENTS = "gen" or "generate" → generate tests for changed files$ARGUMENTS = "coverage" → run with coverage report$ARGUMENTS = "e2e" → run E2E tests (see E2E section below)Execute with verbose output using stack-appropriate commands:
# pytest
pytest {scope} -v --tb=short
# jest / vitest
npx jest {scope} --verbose
npx vitest run {scope}
# go
go test {scope} -v -race
# coverage
pytest --cov={module} --cov-report=term-missing
npx jest --coverage
Follow stack guide conventions for test file naming and patterns. For each target file:
## Test Results: {scope}
Stack: {stack} | Framework: {framework}
Status: {PASS|FAIL} ({passed}/{total})
Duration: {time}
### Failures
{test_name}: {error message + relevant stack trace}
### Coverage (if requested)
{module}: {percentage}%
Uncovered lines: {list}
Suggest next: If called standalone (not from /ship): "Run /review if not yet reviewed, then /ship to close and commit." If called from /ship: return results silently, no suggest.
When $ARGUMENTS = "e2e" or project has playwright.config.*:
# Check for existing Playwright config
ls playwright.config.* 2>/dev/null
npx playwright --version 2>/dev/null
If not installed, guide user: npm init playwright@latest
# Run all E2E tests (headless)
npx playwright test --reporter=list
# Run specific test file
npx playwright test {file}
# Run with UI for debugging
npx playwright test --ui
When asked to generate E2E tests for a user flow:
getByRole, getByLabel, getByText)getByRole/getByLabel over CSS selectors — more resilient to UI changesInclude: browser(s) tested, screenshot paths on failure, trace file links.
After running tests:
.tausik/tausik task log {slug} "Tests: {passed}/{total}".tausik/tausik task add "Fix: description" --defect-of {parent-slug} --role developer.tausik/tausik dead-end "approach" "reason"After generating tests (mode = gen) or when reviewing existing tests, scan for fake test patterns:
| Pattern | Example | Action |
|---|---|---|
| No assertions | def test_foo(): result = foo() (no assert) | Add meaningful assertions |
| Tautological | assert x == x, assert True | Replace with behavior check |
| Hardcoded expected = actual | assert foo() == foo() (re-calling) | Use independent expected value |
| Conditional assertion | if condition: assert ... (condition always False) | Make assertion unconditional |
| Skip without reason | @pytest.mark.skip (no message) | Add reason or remove skip |
| Empty test body | def test_something(): pass | Implement or delete |
| Assert in bare except | try: assert ... except: pass | Remove bare except |
Note: @pytest.mark.skip(reason="...") with a reason is NOT a fake test.
If any generated test matches a fake pattern — fix it immediately before reporting success. If reviewing existing tests and fake patterns are found — report as HIGH severity.
.tausik/tausik task log {slug} "Tests: {passed}/{total}, coverage {pct}%"conftest.py — always run from project root.src/ need correct sys.path setup or pyproject.toml [tool.pytest] pythonpath.Query/store cross-project knowledge in Shared Brain.
Save session snapshot — handoff + CLAUDE.md update.
Create a standardized git commit.
Debug a bug — reproduce, isolate root cause, fix.
End session — handoff + decisions + CLAUDE.md.
Time-boxed SENAR investigation before a task.