temporal-python-testing skill
✓ DoğrulandıTemporal workflow'larını; birim test, entegrasyon testi, zaman atlama (time-skipping) ve replay testi stratejileriyle pytest kullanarak test edin.
- GitHub yıldızları
- 42.413
- Dosyalar
- 5
- Son commit
- 9 Kas 2026
- Lisans
- MIT
- İzin verilen araçlar
- —
temporal-python-testing skill ne işe yarar?
temporal-python-testing bir agent skill'dir. Temporal workflow'larını; birim test, entegrasyon testi, zaman atlama (time-skipping) ve replay testi stratejileriyle pytest kullanarak test edin.
Özet, skill'in SKILL.md dosyasından oluşturuldu.
temporal-python-testing skilli hakkında
Bu SKILL, dağıtık sistemler inşa eden geliştiricilerin Temporal workflow'larını pytest kullanarak test etmelerini sağlar. Workflow determinizmini sağlamak için birim test, entegrasyon testi ve replay testi için özel stratejiler sunar. Bir agent; yeni workflow testleri uygularken, hataları ayıklarken veya Docker Compose ile yerel bir geliştirme ortamı kurarken bu SKILL'i yüklemelidir.
SKILL; unit-testing.md ve integration-testing.md gibi markdown kaynakları aracılığıyla özelleşmiş rehberlik sunar. Kullanıcıların WorkflowEnvironment aracılığıyla zaman atlama özelliğini uygulayarak, aylar süren workflow'ları saniyeler içinde çalışan testlere dönüştürmelerine yardımcı olur. Geliştiriciler ayrıca, workflow mantığını harici bağımlılıklardan ayırmak için izole activity testi ve mocking stratejileri sunan ActivityEnvironment'ı kullanabilirler. Amaç, hızlı geri bildirim döngülerini korurken ekiplerin hem workflow'lar hem de activity'ler için en az %80 mantık kapsamına (logic coverage) ulaşmasına yardımcı olmaktır.
Bir agent bununla neler yapabilir
- 1Uzun süren workflow testlerini hızlandırınNormalde aylar süren workflow'ları sadece birkaç saniye içinde test etmek için zaman atlama özelliğini kullanın.
- 2Workflow mantığını bağımlılıklardan izole edinHarici bağımlılıkların sonuçları etkilemesini önlemek için activity'leri mock'layarak entegrasyon testleri uygulayın.
- 3Workflow determinizmini sağlayınProduction geçmişlerini replay ederek workflow değişikliklerinin deterministik kalmasını doğrulayın.
- 4Yerel geliştirme ortamlarını yapılandırınDocker Compose ve pytest konfigürasyonlarını içeren eksiksiz bir yerel geliştirme yığını kurun.
Skill'in SKILL.md dosyasından yazılmıştır. Her kullanım durumu oradaki bir alıntı ile kontrol edilir.
temporal-python-testing skill nasıl kurulur
Her komut, skill klasörünü istemcinin skills dizinine kopyalar. Yüklemek için istemciyi yeniden başlatın veya yeni bir oturum başlatın.temporal-python-testing skill'ini Eklenti uygulamasına kur
/plugin marketplace add wshobson/agents /plugin install backend-development@claude-code-workflows
temporal-python-testing skill'ini Claude Code uygulamasına kur
~/.claude/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.claude/skills/temporal-python-testingtemporal-python-testing skill'ini Claude Code (project) uygulamasına kur
.claude/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing .claude/skills/temporal-python-testingtemporal-python-testing skill'ini Codex uygulamasına kur
~/.agents/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.agents/skills/temporal-python-testingtemporal-python-testing skill'ini Gemini CLI uygulamasına kur
~/.gemini/skills/temporal-python-testing/SKILL.md
$ npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.gemini/skills/temporal-python-testingtemporal-python-testing skill'ini Claude.ai uygulamasına kur
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
Otomatik kontroller
Çalıştırıldı 13 Kas 2026Tam rapor →Otomatik kontrollerimizi geçti. Bu bir güvenlik denetimi değil: bir ajanın çalıştırmasına izin vermeden önce betikleri okuyun. Kontroller nasıl çalışır
- Kaynak deposu bağlantılı ve erişilebilirwshobson/agents/plugins/backend-development/skills/temporal-python-testing is public and reachablegithub.com/wshobson/agents/tree/HEAD/plugins/backend-develop ↗Geçti
- Açık kaynak lisansı (OSI)MITspdx.org/licenses/MIT.html ↗Geçti
- Son bir yıl içinde commit veya sürüm mevcutLast commit 2026-11-09github.com/wshobson/agents/commits ↗Geçti
- Betiklerde indir-çalıştır veya kimlik bilgisi hırsızlığı yokNo scripts in the skill folderGeçti
- SKILL.md içinde gizli talimat yokNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/wshobson/agents/blob/HEAD/plugins/backend-develop ↗Geçti
- Önceden izin verilen araçlar sınırlıNo pre-approved tools; the agent asks before using onegithub.com/wshobson/agents/blob/HEAD/plugins/backend-develop ↗Geçti
SKILL.md
GitHub'da görüntüleTemporal 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
Bu becerideki dosyalar
5temporal-python-testing skill soruları
temporal-python-testing skill'ini Claude Code uygulamasına nasıl kurarım?
npx degit wshobson/agents/plugins/backend-development/skills/temporal-python-testing ~/.claude/skills/temporal-python-testing komutunu çalıştırın. Claude Code, skill'leri ~/.claude/skills (tüm projeler) veya .claude/skills (tek proje) konumundan yükler ve açıklaması görevle eşleştiğinde skill'i kullanır.
temporal-python-testing skill'ini hangi istemciler kullanabilir?
Agent Skills biçimini okuyan her istemci: Claude Code, Codex, Gemini CLI ve claude.ai (ZIP olarak yükleyin). Skill içindeki betikler yalnızca istemcinin kod çalıştırmaya izin verdiği yerlerde çalışır.
Zaman atlama (time-skipping) test sürecine nasıl fayda sağlar?
Zaman atlama, aylar süren workflow'ların sadece saniyeler içinde test edilmesine olanak tanıyarak hızlı geri bildirim sağlar.