temporal-python-testing

Test Temporal Python workflows with unit, integration, and replay testing.

3|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/DrLuggels/my_dhbw --skill temporal-python-testing-drluggels
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/DrLuggels/my_dhbw/tree/main/.claude/plugins/backend-development/skills/temporal-python-testing
Command: npx skills add https://github.com/DrLuggels/my_dhbw --skill temporal-python-testing-drluggels

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive strategies and practical examples for testing Temporal Python workflows and activities, ensuring reliability and maintainability.

Core Features & Use Cases

  • Unit Testing: Test workflows and activities in isolation with time-skipping and mocking.
  • Integration Testing: Validate workflow orchestration with mocked external dependencies.
  • Replay Testing: Ensure code changes are backward-compatible with production histories.
  • Local Development Setup: Configure Temporal server and pytest for efficient local testing.
  • Use Case: You've updated a Temporal workflow and need to ensure the changes don't break existing, long-running instances. Use this Skill to replay production histories against your new code.

Quick Start

Show me how to write a basic 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?

Test Temporal Python workflows using pytest by isolating workflows and activities with time-skipping and mocking. This approach validates orchestration logic locally without waiting for real time delays.

What is replay testing for Temporal workflows?

Replay testing ensures backward-compatibility by replaying production histories against new Temporal workflow code. This verifies that updates do not break existing, long-running workflow instances.

How do I mock activities in Temporal Python integration tests?

Mock activities in Temporal Python integration tests by replacing external dependencies with mocked implementations. This validates workflow orchestration logic without requiring actual external service connections.

Can I use time-skipping to test long-running Temporal workflows?

Yes, time-skipping allows you to test long-running Temporal workflows by automatically advancing mock clocks. This lets unit tests execute workflows with sleep timers instantly rather than waiting.

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

Set up a local Temporal server for Python testing using Docker Compose and configure pytest. This environment provides the infrastructure to run and validate workflow integration tests efficiently during local development.

Why do my Temporal workflow tests fail after code updates?

Temporal workflow tests fail after code updates when changes break determinism or backward compatibility. Use replay testing against production histories to identify incompatible modifications in your workflow logic.