temporal-python-testing

Test Temporal Python SDK workflows with time-skipping, mocked activities, and replay testing.

6|2|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/amurata/cc-tools --skill temporal-python-testing-amurata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/amurata/cc-tools/tree/main/plugins/backend-development/skills/temporal-python-testing
Command: npx skills add https://github.com/amurata/cc-tools --skill temporal-python-testing-amurata

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the testing of Temporal workflows and activities, ensuring reliability and correctness through efficient unit, integration, and replay testing strategies.

Core Features & Use Cases

  • Time-Skipping Unit Tests: Execute workflows instantly, drastically reducing test execution time.
  • Activity Mocking: Isolate workflow logic by mocking external dependencies.
  • Replay Testing: Validate workflow determinism and code changes against production histories.
  • Local Development Setup: Provides guidance on setting up Temporal servers and pytest for a robust local testing environment.
  • Use Case: When developing a new Temporal workflow, use this Skill to write fast unit tests that simulate long-running processes and integration tests that verify interactions with mocked external services, ensuring the workflow behaves as expected before deployment.

Quick Start

Use the temporal-python-testing skill to write a unit test for a Temporal workflow using pytest and time-skipping.

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 with pytest using time-skipping?

To test Temporal workflows with pytest using time-skipping, execute workflows instantly to simulate long-running processes. This approach drastically reduces test execution time while validating workflow logic without waiting for actual time to pass.

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

Temporal replay testing validates workflow determinism by replaying code changes against production histories. You need replay testing when modifying workflow logic to ensure existing executions remain deterministic and backward-compatible with previously recorded event histories.

Can I mock activities in Temporal workflow integration tests?

Yes, you can mock activities in Temporal workflow integration tests to isolate workflow logic. Mocking external dependencies allows you to verify interactions with external services without making real network calls during test execution.

How do I set up a local Temporal server for pytest integration testing?

Set up a local Temporal server for pytest integration testing by configuring a local development environment. This provides a robust testing environment to validate workflow and activity interactions before deployment.

What is the best way to ensure Temporal workflow determinism in Python?

The best way to ensure Temporal workflow determinism in Python is combining unit tests with time-skipping and replay testing. Replay testing validates code changes against production histories, confirming workflows remain deterministic across updates.

Why does my Temporal workflow test hang during long-running process simulation?

Temporal workflow tests hang during long-running process simulation when time-skipping is not enabled. Enable time-skipping in your pytest configuration to execute workflows instantly, bypassing real-time delays and drastically reducing test execution time.