temporal-python-testing

Validate Temporal Python workflows with deterministic pytest tests and mocked activities.

1|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/civictechdc/votecatcher --skill temporal-python-testing-civictechdc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/civictechdc/votecatcher/tree/main/backend/.agent/skills/temporal-python-testing
Command: npx skills add https://github.com/civictechdc/votecatcher --skill temporal-python-testing-civictechdc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides structured guidance and practical examples for testing Temporal Python workflows using pytest, covering unit, integration, replay testing, and local development setups to ensure reliable, deterministic behavior.

Core Features & Use Cases

  • Unit Testing: Validate individual workflows and activities with time-skipping.
  • Integration & Replay: Verify orchestration across real and mocked components, and determinism against production histories.
  • Local Development: Setup Temporal server locally for rapid iteration and CI integration.
  • Use Case: Teams can gradually adopt testing patterns, build robust test suites, and prevent regressions in Temporal-based apps.

Quick Start

Run the unit tests in a time-skipping environment to verify your workflow logic.

Frequently Asked Questions about temporal-python-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Temporal Python workflows deterministically using pytest?

Test Temporal Python workflows deterministically by using pytest with time-skipping environments and mocked activities to validate orchestration logic without relying on real external systems.

What is Temporal replay testing and when do I need it?

Temporal replay testing verifies workflow determinism by replaying execution against production histories. You need it to ensure code changes do not break in-progress workflows or cause non-deterministic behavior in production.

Can I run a local Temporal server for integration testing and CI pipelines?

Yes, you can run a local Temporal server using Docker for integration testing and CI pipelines. This enables rapid iteration and end-to-end validation of workflows before deploying changes.

Do I need Docker to test Temporal workflows with pytest?

Docker is optional for running a local Temporal server during end-to-end testing. Unit tests and replay tests only require pytest and the Temporal Python SDK to validate workflow logic without Docker.

What is the best way to mock activities in Temporal Python workflows?

The best way to mock activities in Temporal Python workflows is to use pytest fixtures that inject mocked activity implementations. This isolates workflow orchestration logic for reliable and deterministic unit tests.