AGENT SKILL

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies (unit, integration, replay).

License 许可
Apache-2.0
最近更新
2026-11-14
Stars
★ 0
Forks
1

01 前言 Front Matter

name
temporal-python-testing
description
Test Temporal workflows with pytest, time-skipping, and mocking strategies (unit, integration, replay).

02 资源文件 4

03 SKILL.md 正文

Steps

  1. Choose the testing level based on scope:
    • Unit: workflow logic with time-skipping; activities in isolation.
    • Integration: worker + workflow with mocked activities/external boundaries.
    • Replay: validate determinism against recorded histories.
  2. For workflow tests, start a time-skipping WorkflowEnvironment, run a Worker, then execute the workflow and assert results.
  3. Mock only external boundaries (activities/external clients), and keep workflow logic deterministic.
  4. Use replay tests before/when changing workflow code paths that may affect determinism.
  5. Keep tests fast and isolated; ensure environment/workers are properly shut down.

Expected Result

Reliable, deterministic Temporal tests that run quickly and catch workflow regressions without flakiness.

04 同仓库更多 Skills