MCP HubMCP Hub
스킬 목록으로 돌아가기

run-puzzle-tests

pjt222
업데이트됨 2 days ago
3 조회
17
2
17
GitHub에서 보기
테스팅aitestingdesign

정보

이 스킬은 WSL R을 통해 jigsawR 테스트 스위트를 실행하며, 전체 테스트, 패턴 기반 필터링된 부분집합 또는 단일 파일을 지원하고 통과/실패/건너뜀 결과를 해석합니다. 자동으로 실패하는 테스트를 식별하며, `--vanilla` 모드를 피해 renv 종속성을 올바르게 처리합니다. 개발자는 R 소스 변경 후, 기능 추가 시, 커밋 전, 또는 특정 테스트 실패 디버깅 시에 이를 사용해야 합니다.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/run-puzzle-tests

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Run Puzzle Tests

Run the jigsawR test suite and interpret results.

When to Use

  • After modifying R source code in the package
  • After adding a new puzzle type or feature
  • Before committing changes
  • Debugging a specific test failure

Inputs

  • Required: Test scope (full, filtered, or single)
  • Optional: Filter pattern for filtered mode (e.g. "snic", "rectangular")
  • Optional: Specific test file path for single mode

Procedure

Step 1: Choose Test Scope

ScopeUse whenDuration
FullBefore commits, after major changes~2-5 min
FilteredWorking on one puzzle type~30s
SingleDebugging a specific test file~10s

Got: Test scope selected: full before commits, filtered for one puzzle type, single for debugging one test.

If fail: If unsure, default to full suite. Slower but catches cross-type regressions.

Step 2: Create and Execute Test Script

Full suite:

Create a script (e.g., /tmp/run_tests.R):

devtools::test()
R_EXE="/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe"
cd /mnt/d/dev/p/jigsawR && "$R_EXE" -e "devtools::test()"

Filtered by pattern:

"$R_EXE" -e "devtools::test(filter = 'snic')"

Single file:

"$R_EXE" -e "testthat::test_file('tests/testthat/test-snic-puzzles.R')"

Got: Test output with pass/fail/skip counts.

If fail:

  • Do NOT use --vanilla; renv needs .Rprofile to activate
  • On renv errors, run renv::restore() first
  • For complex commands failing with Exit code 5, write to a script file

Step 3: Interpret Results

Look for the summary line:

[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
  • PASS: Tests succeeded
  • FAIL: Tests failed (need investigation)
  • SKIP: Tests skipped (often due to optional packages like snic)
  • WARN: Warnings during tests (review but not blocking)

Got: Summary line parsed for PASS, FAIL, SKIP, WARN counts. FAIL = 0 for clean run.

If fail: Without summary line, the runner crashed before completing. Check for R-level errors above. If output is truncated, redirect to file: "$R_EXE" -e "devtools::test()" > test_results.txt 2>&1.

Step 4: Investigate Failures

If tests fail:

  1. Read the failure message — includes file, line, expected vs actual
  2. Check if new failure or pre-existing
  3. For assertion failures, read the test and the function tested
  4. For error failures, check if a function signature changed
# Run failing test with verbose output
"$R_EXE" -e "testthat::test_file('tests/testthat/test-failing.R', reporter = 'summary')"

Got: Root cause of each failing test identified — regression (code fix) or environment issue (missing dep, path).

If fail: With unclear failure messages, add browser() or print() and re-run with testthat::test_file() for interactive debugging.

Step 5: Verify Skip Reasons

Skips are normal when optional dependencies are missing:

  • snic package tests skip with skip_if_not_installed("snic")
  • Tests requiring specific OS skip with skip_on_os()
  • CRAN-only skips with skip_on_cran()

Confirm skip reasons are legitimate, not masking real failures.

Got: All skips accounted for by legitimate reasons. No skips masking failures.

If fail: If a skip seems suspicious, temporarily remove the skip_if_*() call and run the test.

Validation

  • All tests pass (FAIL = 0)
  • No unexpected warnings
  • Skip count matches expected (only optional deps)
  • Test count has not decreased (no tests accidentally removed)

Pitfalls

  • Using --vanilla: Breaks renv activation. Never use it with jigsawR.
  • Complex -e strings: Shell escaping issues cause Exit code 5. Use script files.
  • Stale package state: Run devtools::load_all() or devtools::document() before testing if NAMESPACE changed.
  • Missing test dependencies: Some tests need suggested packages. Check DESCRIPTION Suggests field.
  • Parallel test issues: If tests interfere, run sequentially with testthat::test_file().

Related Skills

  • generate-puzzle — generate puzzles to verify behavior matches tests
  • add-puzzle-type — new types need comprehensive test suites
  • write-testthat-tests — patterns for writing R tests
  • validate-piles-notation — test PILES parsing independently

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-lite/skills/run-puzzle-tests
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

evaluating-llms-harness

테스팅

이 Claude Skill은 MMLU, GSM8K를 포함한 60개 이상의 표준화된 학술 과제에서 LLM 성능을 벤치마크하기 위해 lm-evaluation-harness를 실행합니다. 개발자들이 모델 품질을 비교하고, 학습 진행 상황을 추적하거나 학술 결과를 보고할 수 있도록 설계되었습니다. 이 도구는 HuggingFace와 vLLM 모델을 포함한 다양한 백엔드를 지원합니다.

스킬 보기

cloudflare-cron-triggers

테스팅

이 스킬은 cron 표현식을 사용하여 Worker를 스케줄링하기 위한 Cloudflare Cron Triggers 구현에 관한 포괄적인 지식을 제공합니다. 주기적 작업, 유지보수 작업, 자동화된 워크플로우 설정 방법을 다루며, 잘못된 cron 표현식이나 시간대 문제 같은 일반적인 이슈들을 해결하는 방법을 포함합니다. 개발자들은 이를 통해 스케줄된 핸들러 구성, cron 트리거 테스트, Workflows 및 Green Compute와의 연동 작업을 수행할 수 있습니다.

스킬 보기

webapp-testing

테스팅

이 Claude Skill은 Python 스크립트를 통해 로컬 웹 애플리케이션을 테스트하기 위한 Playwright 기반 툴킷을 제공합니다. 프론트엔드 검증, UI 디버깅, 스크린샷 캡처, 로그 확인 기능을 지원하며 서버 라이프사이클을 관리합니다. 브라우저 자동화 작업에 사용하되 컨텍스트 오염을 방지하기 위해 소스 코드를 읽지 않고 스크립트를 직접 실행하세요.

스킬 보기

finishing-a-development-branch

테스팅

이 스킬은 테스트 통과를 확인한 후 체계적인 통합 옵션을 제시하여 개발자가 완성된 작업을 마무리하도록 돕습니다. 구현이 완료된 후 머지, PR 생성, 브랜치 정리와 같은 워크플로우를 안내합니다. 코드가 준비되고 테스트가 완료되었을 때 개발 프로세스를 체계적으로 마무리하기 위해 사용하세요.

스킬 보기