temporal-python-testing skill
✓ 인증됨pytest를 사용하여 단위 테스트, 통합 테스트, 시간 건너뛰기(time-skipping), 리플레이 테스트 전략으로 Temporal workflow를 테스트합니다.
- GitHub 스타
- 42,413
- 파일
- 5
- 마지막 커밋
- 2026년 11월 9일
- 라이선스
- MIT
- 허용된 도구
- —
temporal-python-testing skill은 무엇을 하나요?
temporal-python-testing은(는) agent skill입니다. pytest를 사용하여 단위 테스트, 통합 테스트, 시간 건너뛰기(time-skipping), 리플레이 테스트 전략으로 Temporal workflow를 테스트합니다.
skill의 SKILL.md에서 생성된 요약입니다.
temporal-python-testing skill 정보
이 SKILL은 분산 시스템을 구축하는 개발자가 pytest를 사용하여 Temporal workflow를 테스트할 수 있도록 지원합니다. workflow의 결정론(determinism)을 보장하기 위해 단위 테스트, 통합 테스트, 리플레이 테스트를 위한 구체적인 전략을 제공합니다. 새로운 workflow 테스트를 구현하거나, 실패 원인을 디버깅하거나, Docker Compose를 사용하여 로컬 개발 환경을 설정할 때 에이전트가 이 SKILL을 로드해야 합니다.
이 SKILL은 unit-testing.md 및 integration-testing.md와 같은 markdown 리소스를 통해 전문적인 가이드를 제공합니다. 사용자가 WorkflowEnvironment를 통해 시간 건너뛰기를 구현하여 몇 달이 걸리는 workflow를 몇 초 만에 실행되는 테스트로 전환할 수 있도록 돕습니다. 또한 개발자는 ActivityEnvironment를 사용하여 활동을 격리하여 테스트하거나, workflow 로직을 외부 의존성으로부터 분리하기 위한 모킹(mocking) 전략을 사용할 수 있습니다. 목표는 빠른 피드백 루프를 유지하면서 workflow와 activity 모두에 대해 최소 80%의 로직 커버리지를 달성하도록 돕는 것입니다.
agent가 수행할 수 있는 작업
- 1장기 실행 workflow 테스트 가속화시간 건너뛰기를 사용하여 통상적으로 몇 달이 걸리는 workflow를 단 몇 초 만에 테스트합니다.
- 2의존성으로부터 workflow 로직 격리activity를 모킹하여 외부 의존성이 결과에 영향을 미치지 않도록 통합 테스트를 구현합니다.
- 3workflow 결정론 보장운영 환경의 히스토리를 리플레이하여 workflow 변경 사항이 결정론을 유지하는지 검증합니다.
- 4로컬 개발 환경 구성Docker Compose 및 pytest 설정을 포함한 완전한 로컬 개발 스택을 구축합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
temporal-python-testing skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 temporal-python-testing skill 설치
/plugin marketplace add wshobson/agents /plugin install backend-development@claude-code-workflows
Claude Code에 temporal-python-testing skill 설치
~/.claude/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.claude/skills/temporal-python-testingClaude Code (project)에 temporal-python-testing skill 설치
.claude/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing .claude/skills/temporal-python-testingCodex에 temporal-python-testing skill 설치
~/.agents/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.agents/skills/temporal-python-testingGemini CLI에 temporal-python-testing skill 설치
~/.gemini/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.gemini/skills/temporal-python-testingClaude.ai에 temporal-python-testing skill 설치
npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing temporal-python-testing && zip -r temporal-python-testing.zip temporal-python-testing # claude.ai → Customize → Skills → + → Create skill → Upload a skill → temporal-python-testing.zip
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능wshobson/agents/plugins/backend-development/skills/temporal-python-testing is public and reachablegithub.com/wshobson/agents/tree/HEAD/plugins/backend-develop ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-09github.com/wshobson/agents/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/wshobson/agents/blob/HEAD/plugins/backend-develop ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/wshobson/agents/blob/HEAD/plugins/backend-develop ↗통과
SKILL.md
GitHub에서 보기Temporal Python Testing Strategies
Comprehensive testing approaches for Temporal workflows using pytest, progressive disclosure resources for specific testing scenarios.
When to Use This Skill
- Unit testing workflows - Fast tests with time-skipping
- Integration testing - Workflows with mocked activities
- Replay testing - Validate determinism against production histories
- Local development - Set up Temporal server and pytest
- CI/CD integration - Automated testing pipelines
- Coverage strategies - Achieve ≥80% test coverage
Testing Philosophy
Recommended Approach (Source: docs.temporal.io/develop/python/testing-suite):
- Write majority as integration tests
- Use pytest with async fixtures
- Time-skipping enables fast feedback (month-long workflows → seconds)
- Mock activities to isolate workflow logic
- Validate determinism with replay testing
Three Test Types:
- Unit: Workflows with time-skipping, activities with ActivityEnvironment
- Integration: Workers with mocked activities
- End-to-end: Full Temporal server with real activities (use sparingly)
Available Resources
This skill provides detailed guidance through progressive disclosure. Load specific resources based on your testing needs:
Unit Testing Resources
File: resources/unit-testing.md
When to load: Testing individual workflows or activities in isolation
Contains:
- WorkflowEnvironment with time-skipping
- ActivityEnvironment for activity testing
- Fast execution of long-running workflows
- Manual time advancement patterns
- pytest fixtures and patterns
Integration Testing Resources
File: resources/integration-testing.md
When to load: Testing workflows with mocked external dependencies
Contains:
- Activity mocking strategies
- Error injection patterns
- Multi-activity workflow testing
- Signal and query testing
- Coverage strategies
Replay Testing Resources
File: resources/replay-testing.md
When to load: Validating determinism or deploying workflow changes
Contains:
- Determinism validation
- Production history replay
- CI/CD integration patterns
- Version compatibility testing
Local Development Resources
File: resources/local-setup.md
When to load: Setting up development environment
Contains:
- Docker Compose configuration
- pytest setup and configuration
- Coverage tool integration
- Development workflow
Quick Start Guide
Basic Workflow Test
import pytest
from temporalio.testing import WorkflowEnvironment
from temporalio.worker import Worker
@pytest.fixture
async def workflow_env():
env = await WorkflowEnvironment.start_time_skipping()
yield env
await env.shutdown()
@pytest.mark.asyncio
async def test_workflow(workflow_env):
async with Worker(
workflow_env.client,
task_queue="test-queue",
workflows=[YourWorkflow],
activities=[your_activity],
):
result = await workflow_env.client.execute_workflow(
YourWorkflow.run,
args,
id="test-wf-id",
task_queue="test-queue",
)
assert result == expected
Basic Activity Test
from temporalio.testing import ActivityEnvironment
async def test_activity():
env = ActivityEnvironment()
result = await env.run(your_activity, "test-input")
assert result == expected_output
Coverage Targets
Recommended Coverage (Source: docs.temporal.io best practices):
- Workflows: ≥80% logic coverage
- Activities: ≥80% logic coverage
- Integration: Critical paths with mocked activities
- Replay: All workflow versions before deployment
Key Testing Principles
- Time-Skipping - Month-long workflows test in seconds
- Mock Activities - Isolate workflow logic from external dependencies
- Replay Testing - Validate determinism before deployment
- High Coverage - ≥80% target for production workflows
- Fast Feedback - Unit tests run in milliseconds
How to Use Resources
Load specific resource when needed:
- "Show me unit testing patterns" → Load
resources/unit-testing.md - "How do I mock activities?" → Load
resources/integration-testing.md - "Setup local Temporal server" → Load
resources/local-setup.md - "Validate determinism" → Load
resources/replay-testing.md
Additional References
- Python SDK Testing: docs.temporal.io/develop/python/testing-suite
- Testing Patterns: github.com/temporalio/temporal/blob/main/docs/development/testing.md
- Python Samples: github.com/temporalio/samples-python
이 스킬의 파일
5temporal-python-testing skill 질문
Claude Code에 temporal-python-testing skill을 어떻게 설치하나요?
npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.claude/skills/temporal-python-testing를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
temporal-python-testing skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
시간 건너뛰기가 테스트에 어떤 이점을 주나요?
시간 건너뛰기를 사용하면 몇 달이 소요되는 workflow를 단 몇 초 만에 테스트할 수 있어 빠른 피드백을 받을 수 있습니다.