temporal-python-testing

Test Temporal Python workflows with pytest and mocked activities.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill temporal-python-testing-ccf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/ccf/claude-code-ccf-marketplace/tree/main/plugins/backend-development/skills/temporal-python-testing
Command: npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill temporal-python-testing-ccf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides structured guidance for testing Temporal workflows using pytest, time-skipping, and activity mocking. It covers unit, integration, replay testing, and local development setup to help developers validate Temporal workflows efficiently.

Core Features & Use Cases

  • Unit Testing: fast, isolated workflow and activity tests with time-skipping.
  • Integration & Replay: test interactions with mocked activities and determinism against history.
  • Local Development: guidance to set up a local Temporal server for end-to-end testing.

Quick Start

Install dependencies and run the test suite:

  • Install dependencies: pip install temporalio pytest
  • Start a local Temporal server (optional): docker-compose up -d
  • Run unit tests: pytest tests/unit

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?

Test Temporal workflows with pytest by utilizing the Temporal Python SDK to run isolated unit tests, apply activity mocking, and execute replay tests against workflow history for reliable validation.

What is time-skipping in Temporal workflow testing?

Time-skipping in Temporal workflow testing is a mechanism that fast-forwards workflow timers and schedules, allowing long-running workflows to complete instantly during unit tests without real-time delays.

Do I need a local Temporal server for integration testing?

A local Temporal server is optional for integration testing. You can start one using Docker Compose for end-to-end local development, but unit and replay tests run independently using mocked activities.

How do I mock activities in Temporal Python tests?

Mock activities in Temporal Python tests by defining mock implementations within your test environment, allowing you to isolate workflow logic and test interactions deterministically without external dependencies.

What's the best way to validate Temporal workflow determinism?

Validate Temporal workflow determinism by running replay tests that replay historical event logs against current workflow code, ensuring that changes do not break existing workflow executions.