temporal-python-testing

Test Temporal Python workflows and activities for deterministic execution and failure scenarios using pytest and WorkflowEnvironment time-skipping.

Updated May 16, 2026
One-click install
npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill temporal-python-testing-p-o-ke-nae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory/tree/main/.github/skills/temporal-python-testing
Command: npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill temporal-python-testing-p-o-ke-nae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the guesswork from testing Temporal Python workflows by showing how to validate behavior quickly, deterministically, and with confidence before deployment.

Core Features & Use Cases

  • Workflow unit testing: Validate workflow branching, timers, retries, and long-running logic with time-skipping.
  • Activity testing: Isolate activity behavior with ActivityEnvironment for fast, focused verification.
  • Integration and replay testing: Exercise workflows with mocked dependencies, signals, queries, and production history replay to catch non-determinism.
  • Local development setup: Prepare a Temporal server, pytest configuration, coverage tracking, and CI-friendly test workflows.
  • Use case: When a workflow change might break running executions, this Skill helps you test compatibility and determinism before shipping.

Quick Start

Use the temporal-python-testing skill to write a pytest-based time-skipping test for a Temporal workflow with mocked activities and verify the result.

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 for determinism?

Testing Temporal Python workflows for determinism requires pytest, WorkflowEnvironment time-skipping, and Replayer to validate branching, timers, and long-running logic against deterministic execution behavior and failure scenarios.

What is time-skipping in Temporal workflow testing?

Time-skipping in Temporal workflow testing is a WorkflowEnvironment mechanism that advances long-running timers and scheduled logic instantly, enabling fast unit testing of workflow branching and retries without real-time delays.

How do I isolate and test Temporal activities with pytest?

To isolate and test Temporal activities with pytest, use ActivityEnvironment for fast, focused verification of individual activity behavior independently before integrating it into the full workflow execution.

Can I use production history replay to catch non-determinism in Temporal workflows?

Yes, you can use production history replay with the Replayer to catch non-determinism in Temporal workflows by exercising workflows against recorded execution history to verify compatibility and identify non-deterministic changes before shipping.

How do I set up a local development environment for Temporal Python testing?

Setting up a local development environment for Temporal Python testing requires preparing a Temporal server, configuring pytest, enabling coverage tracking, and establishing CI-friendly test workflows to validate signals, queries, and mocked activities.

When should I use replay testing for Temporal workflows?

You should use replay testing for Temporal workflows when a workflow change might break running executions, using Replayer to validate versioning practices and confirm compatibility to ensure determinism is maintained before deployment.