temporal-python-testing

Test Temporal Python workflows and activities using pytest with time-skipping.

38.6k|4.1k|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/wshobson/agents --skill temporal-python-testing-wshobson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/wshobson/agents/tree/main/plugins/backend-development/skills/temporal-python-testing
Command: npx skills add https://github.com/wshobson/agents --skill temporal-python-testing-wshobson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the testing of Temporal Python workflows and activities, ensuring reliability and correctness through various testing strategies.

Core Features & Use Cases

  • Unit Testing: Test individual workflows and activities in isolation using time-skipping and mocked environments.
  • Integration Testing: Validate workflow orchestration with mocked external dependencies and error injection.
  • Replay Testing: Ensure code changes are backward-compatible by replaying against production histories.
  • Local Development Setup: Provides guidance on setting up a local Temporal server and configuring pytest for efficient testing.
  • Use Case: When developing a new Temporal workflow, use this Skill to write comprehensive unit tests for its logic, integration tests to verify its interaction with mocked services, and replay tests to ensure future code updates won't break existing workflows.

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 Python workflows with pytest?

You can test Temporal Python workflows with pytest by using time-skipping for isolated unit tests and mocked environments to validate activity logic and orchestration without a live server.

What is replay testing for Temporal workflows and when is it needed?

Replay testing validates Temporal workflow determinism by replaying code changes against historical production data. It is needed to ensure future code updates won't break existing workflow executions.

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

Local Temporal server setup involves configuring your local development environment and pytest, enabling you to run integration tests with mocked external dependencies and error injection.

Can I mock activities and inject errors in Temporal Python workflow tests?

Yes, you can mock activities and inject errors in Temporal Python workflow tests to validate workflow orchestration and verify how your workflows handle external dependency failures.

Does Temporal Python testing support time-skipping for long-running workflows?

Temporal Python testing supports time-skipping to instantly advance workflow time, allowing you to efficiently unit test long-running workflows and sleep logic without real execution delays.