temporal-python-testing

Automate Temporal workflow testing with pytest, time-skipping, and mocks.

3|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/duanbiao2000/obsidianDoc26 --skill temporal-python-testing-duanbiao2000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/duanbiao2000/obsidianDoc26/tree/main/agents-main/plugins/backend-development/skills/temporal-python-testing
Command: npx skills add https://github.com/duanbiao2000/obsidianDoc26 --skill temporal-python-testing-duanbiao2000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing Temporal workflows can be slow and brittle without deterministic execution and proper isolation. This skill provides structured guidance and ready-to-run patterns to validate workflows quickly using pytest, time-skipping, and activity mocking strategies. It covers unit, integration, replay testing, and local development setups. Use when implementing Temporal workflow tests or debugging test failures.

Core Features & Use Cases

  • Time-skipping enabled unit tests to simulate long-running workflows in seconds with deterministic outcomes.
  • Activity mocking and Worker-based testing to isolate workflow logic from external services.
  • Replay testing guidance to validate determinism against production histories and ensure safe deployments.
  • Local development setup resources to run Temporal server locally for rapid feedback and offline testing.

Quick Start

Run the pytest-based test suite against a locally deployed Temporal server using time-skipping enabled to validate workflow tests quickly.

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 deterministically with pytest?

Test Temporal workflows deterministically using pytest by enabling time-skipping and mocking activities. This approach isolates workflow logic and simulates long-running processes in seconds, ensuring fast and reliable unit test execution.

What is time-skipping in Temporal workflow testing?

Time-skipping in Temporal workflow testing is a mechanism that instantly advances virtual time past sleep timers and delays. It allows long-running workflows to complete in seconds with deterministic outcomes for rapid local development feedback.

How do I mock activities in Temporal workflow tests?

Mock activities in Temporal workflow tests by using Worker-based testing strategies to isolate workflow logic from external services. This ensures unit tests validate workflow code without making actual network calls to downstream dependencies.

What is replay testing for Temporal workflows?

Replay testing for Temporal workflows validates determinism by replaying production execution histories against current workflow code. This ensures safe deployments by verifying new code changes do not break historical executions.

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

Set up a local Temporal server for offline testing using provided local development setup resources. This configuration allows you to run integration tests and achieve rapid feedback without requiring a cloud-hosted Temporal environment.