temporal-python-testing

Set up and run unit, integration, and replay tests for Python Temporal workflows.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill temporal-python-testing-himanshu040604
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/Himanshu040604/codex-skills-setup/tree/main/assets/codex/skills/claude-import/skills/plugins/backend-development%40claude-code-workflows/skills/temporal-python-testing
Command: npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill temporal-python-testing-himanshu040604

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of testing Temporal workflows and activities written in Python, ensuring reliability and correctness through comprehensive testing strategies.

Core Features & Use Cases

  • Unit Testing: Isolate and test individual workflows and activities using time-skipping and mock environments.
  • Integration Testing: Validate interactions between workflows and mocked activities, simulating real-world scenarios.
  • Replay Testing: Ensure code changes are backward-compatible by replaying production histories.
  • Local Development Setup: Provides guidance on setting up a local Temporal environment with Docker Compose and pytest.
  • Use Case: When developing a new Temporal workflow, use this Skill to write unit tests for individual activities, integration tests for the workflow's orchestration logic, and replay tests to ensure compatibility with existing production data before deployment.

Quick Start

Use the temporal-python-testing skill to learn how to set up a local Temporal development environment with pytest.

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 workflows in Python?

Testing Temporal workflows in Python involves unit testing individual activities and integration testing the workflow orchestration logic using pytest fixtures and mock environments to ensure reliability.

How does time-skipping with WorkflowEnvironment work for activity testing?

Time-skipping with WorkflowEnvironment allows you to simulate the passage of time in unit tests, enabling rapid verification of long-running Temporal workflows without actual delays. This isolates and tests individual workflows efficiently.

What is the best way to ensure Temporal workflow changes are backward-compatible?

Replay testing is the best way to ensure backward-compatibility by validating determinism against production histories. This guarantees that new code changes safely process existing execution data before deployment without breaking running workflows.

Can I use pytest with a local Temporal Docker Compose setup for integration testing?

Yes, you can use pytest with a local Temporal Docker Compose setup for integration testing. This configuration simulates real-world scenarios by validating interactions between workflows and mocked activities in an isolated environment.

Why do I need ActivityEnvironment for mocking in Temporal Python testing?

You need ActivityEnvironment for mocking to isolate and test individual activities deterministically within your Temporal Python testing workflow. It allows you to validate activity logic independently of the broader workflow orchestration.

Do I need to validate determinism against production histories before deploying Temporal workflows?

Yes, validating determinism against production histories before deployment is essential for safe deployment of changes. Replay testing catches non-deterministic code changes that could break existing, in-progress Temporal workflow executions.