temporal-python-testing

Test Temporal Python workflows with pytest, time-skipping, and activity mocks.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/CallMeLuigiv2/Socratic-IDE --skill temporal-python-testing-callmeluigiv2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/CallMeLuigiv2/Socratic-IDE/tree/main/.agents/skills/temporal-python-testing
Command: npx skills add https://github.com/CallMeLuigiv2/Socratic-IDE --skill temporal-python-testing-callmeluigiv2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing Temporal workflows can be challenging when time-based logic and external dependencies complicate feedback loops. This skill provides a structured approach using pytest, Temporal's time-skipping testing features, and mocks to accelerate reliable validation of workflows.

Core Features & Use Cases

  • Unit testing workflows with time-skipping to simulate long-running processes instantly.
  • Integration testing with mocked activities to validate orchestration logic without external services.
  • Replay testing to verify determinism and history compatibility across code changes.
  • Local development workflow setup for running tests against a local Temporal environment.

Quick Start

Install the Temporal Python SDK and pytest, set up a development environment, initialize a test project under tests/, and run pytest to execute workflow tests. Use WorkflowEnvironment.start_time_skipping to accelerate tests and write tests that instantiate workflows and activities, then execute them via env.client.execute_workflow.

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?

You can test Temporal workflows with pytest by initializing a test environment, using time-skipping to simulate long-running processes instantly, and executing workflows via env.client.execute_workflow for fast feedback.

What is time-skipping in Temporal workflow testing?

Time-skipping in Temporal testing is a mechanism that accelerates feedback by instantly simulating long-running processes, allowing you to validate time-based workflow logic without waiting for real time to pass.

Do I need a running Temporal server for local development workflow tests?

You do not need a running production server; you can run tests against a local Temporal environment using pytest and mocked activities to validate orchestration logic without external services.

Can I use mocked activities for Temporal integration testing?

Yes, you can use mocked activities for Temporal integration testing to validate orchestration logic without external services, ensuring reliable and deterministic feedback by isolating workflows from external dependencies.

How does replay testing verify Temporal workflow determinism?

Replay testing verifies Temporal workflow determinism by replaying historical event logs against code changes to ensure history compatibility, confirming that workflows execute consistently across updates.

What dependencies are required to run Temporal Python workflow tests?

Running Temporal Python workflow tests requires the Temporal Python SDK and pytest, with optional support for mocked activities and time-skipping utilities to run deterministically and accelerate feedback.