temporal-python-testing

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

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill temporal-python-testing-generalreasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/fix-build-agentops/environment/skills/temporal-python-testing
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill temporal-python-testing-generalreasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Temporal workflow testing is often slow and brittle; this Skill provides structured guidance to test Temporal workflows efficiently using pytest, time-skipping, and activity mocks.

Core Features & Use Cases

  • Time-skipping enabled unit tests for fast feedback
  • Integration testing with Activity mocks
  • Replay testing and local development setup

Quick Start

Use pytest to run unit and integration tests for Temporal workflows with time-skipping and activity mocks.

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 using time-skipping?

Test Temporal workflows with pytest by leveraging time-skipping to advance workflow clocks automatically, enabling fast and reliable unit tests without waiting for real timers to elapse. This approach uses mocks for activities to isolate workflow logic.

What is the best way to mock activities in Temporal workflow integration tests?

Mocking activities in Temporal workflow integration tests involves replacing actual activity implementations with mocked functions using pytest. This isolates workflow logic from external dependencies, ensuring tests run quickly and reliably without hitting real services.

Do I need a running Temporal server for workflow replay testing?

Yes, a running Temporal server is required for integration and end-to-end replay testing. Replay testing validates workflow execution history against the current workflow code, ensuring deterministic behavior and detecting non-deterministic changes.

Can I use this approach for local development setups of Temporal workflows?

Yes, you can use this approach for local development setups. It supports fast feedback loops through time-skipping unit tests and integration tests with activity mocks, streamlining local development and debugging of Temporal workflows.

Why are my Temporal workflow tests slow and brittle without time-skipping?

Temporal workflow tests are slow and brittle without time-skipping because they rely on real-time timers and actual activity executions. Time-skipping and pytest activity mocks solve this by advancing clocks instantly and isolating workflow logic.

Does Temporal Python SDK testing with pytest require asyncio support?

Yes, Temporal Python SDK testing with pytest requires asyncio support because Temporal workflows run asynchronously. Pytest with asyncio support ensures proper execution and handling of async workflow tests using time-skipping and activity mocks.