wshobson avatar

Temporal Python Testing

Testing Temporal workflows properly requires understanding three distinct approaches: unit tests with time-skipping that can run month-long workflows in seconds, integration tests with mocked activities to isolate workflow logic, and replay tests that validate determinism against production histories. This skill walks you through pytest fixtures, WorkflowEnvironment setup, activity mocking patterns, and local development configuration with Docker Compose. The progressive disclosure format means you load specific resources based on what you're actually trying to test rather than wading through everything at once. Honestly saves you from the trial-and-error phase of figuring out Temporal's testing paradigms.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
5
skills.sh installs
11.3K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill temporal-python-testing --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

  1. Unit: Workflows with time-skipping, activities with ActivityEnvironment
  2. Integration: Workers with mocked activities
  3. End-to-end: Full Temporal server with real activities (use sparingly)

Available Resources

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Testing & QA, Debugging, Automation & Workflows, Python

More from wshobson/agents

All 174
1wshobson avatarscreen-reader-testingwshobson/agentsTest web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, 11.1Kskills.sh installs
2flutter avatarflutter-testing-appsflutter/skillsComprehensive testing framework for Flutter apps across unit, widget, and integration test layers.9Kskills.sh installs
3github avatarpolyglot-test-agentgithub/awesome-copilotGenerates comprehensive, workable unit tests for any programming language using a multi-agent pipeline. Use when asked to generate tests, write unit tests, impr8.4Kskills.sh installs
4trailofbits avatarproperty-based-testingtrailofbits/skillsProvides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation7.7Kskills.sh installs
5wondelai avatarmom-testwondelai/skillsTalk to customers without leading them using Mom Test rules: discuss their life not your idea, ask about specifics in the past, and talk less. Use when the user6Kskills.sh installs
6avdlee avatarswift-testing-expertavdlee/swift-testing-agent-skillExpert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting 5.5Kskills.sh installs