temporal-python-testing

Test Temporal workflows and activities in Python with pytest, including mocking, replaying, and time-skipping techniques.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/drgaciw/academic-compliance-hub-glm --skill temporal-python-testing-drgaciw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/drgaciw/academic-compliance-hub-glm/tree/main/agents/plugins/backend-development/skills/temporal-python-testing
Command: npx skills add https://github.com/drgaciw/academic-compliance-hub-glm --skill temporal-python-testing-drgaciw

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the complexity of reliably testing Temporal Python workflows and activities, ensuring your distributed systems are robust and deterministic.

Core Features & Use Cases

  • Unit Testing: Write fast, isolated tests for workflows using time-skipping.
  • Integration Testing: Test workflows with mocked activities to simulate external dependencies.
  • Replay Testing: Validate code changes against production histories to ensure backward compatibility and determinism.
  • Local Development Setup: Configure a local Temporal environment for seamless testing.
  • Use Case: You've updated a Temporal workflow that handles order processing. Use this Skill to run replay tests against historical data to confirm your changes won't break existing, in-progress orders before deploying to production.

Quick Start

Use the temporal-python-testing skill 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 Python workflows for determinism?

Test Temporal Python workflow determinism by using replay testing to validate code changes against recorded production histories, ensuring backward compatibility and preventing non-deterministic errors during distributed system execution.

What's the best way to unit test Temporal workflows with pytest?

Unit test Temporal workflows with pytest by leveraging time-skipping features to write fast, isolated tests that control workflow execution time without waiting for real timeouts to elapse.

Can I use mocked activities for Temporal integration testing?

Yes, you can use mocked activities for Temporal integration testing to simulate external dependencies safely. This approach verifies workflow logic and orchestration without calling actual external services.

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

Set up a local Temporal environment for pytest testing by configuring the local Temporal development server and integrating it with your pytest suite to enable seamless workflow execution and validation.

Why should I use replay testing for Temporal workflow updates?

Use replay testing for Temporal workflow updates to validate code changes against production histories. This confirms your updates won't break existing in-progress workflows or violate determinism rules before deployment.