temporal-python-testing

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

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/chicanoandres702/SentientAIBrowser --skill temporal-python-testing-chicanoandres702
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temporal-python-testing
Source: https://github.com/chicanoandres702/SentientAIBrowser/tree/main/.agent/skills/temporal-python-testing
Command: npx skills add https://github.com/chicanoandres702/SentientAIBrowser --skill temporal-python-testing-chicanoandres702

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Temporal workflow testing is challenging and time-consuming; this skill provides structured patterns using pytest, time-skipping, and activity mocking to deliver fast, deterministic tests.

Core Features & Use Cases

  • Unit testing workflows with time-skipping and ActivityEnvironment
  • Integration testing with mocked activities and failure scenarios
  • Replay testing to validate determinism against production histories
  • Local development setup with Temporal server and pytest
  • Progressive disclosure resources for targeted learning
  • CI/CD integration guidance and best practices

Quick Start

Run time-skipping guided tests locally by configuring WorkflowEnvironment and pytest and executing the provided unit/integration/replay tests.

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

Test Temporal workflows with pytest by configuring WorkflowEnvironment to enable time-skipping, allowing fast and deterministic execution of workflow logic without real-time delays. This approach uses ActivityEnvironment for unit testing and mocked activities for integration scenarios.

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

Mocking activities in Temporal Python tests involves using ActivityEnvironment to isolate workflow logic and inject controlled responses or failures. This ensures deterministic integration testing by validating how workflows handle mocked activity failures and edge cases without external dependencies.

Do I need a local Temporal server to run workflow tests?

A local Temporal server is required for end-to-end integration testing and local development setup. However, unit tests utilizing time-skipping and ActivityEnvironment can run deterministically without a live server, providing faster feedback during development.

How does replay testing validate Temporal workflow determinism?

Replay testing validates Temporal workflow determinism by replaying production event histories against the current workflow code to ensure consistent execution. This technique catches non-deterministic changes in workflow logic by comparing replayed outputs against recorded historical state transitions.

Can I integrate Temporal pytest tests into a CI/CD pipeline?

You can integrate Temporal pytest tests into CI/CD pipelines by executing time-skipping unit tests and replay tests as automated validation steps. The provided testing patterns support continuous integration by ensuring workflow determinism and validating failure scenarios on every code change.