Skip to content
Kitbay
Skill

temporal-python-testing

MITUpdated on Nov 9, 202642,406GitHub stars

A skill from Seth Hobson's agents collection, in its backend-development plugin, for testing Temporal workflows written in Python with pytest.

What the skill teaches

A skill from Seth Hobson's agents collection, in its backend-development plugin, for testing Temporal workflows written in Python with pytest. It explains unit tests that use Temporal's time-skipping test environment, so a workflow that would wait a month finishes in seconds, and an activity environment for testing activities on their own. Integration guidance covers replacing activities with mocks, injecting errors, multi-activity workflows, signals and queries. Replay testing runs workflow code against recorded histories, including production ones, to catch non-deterministic changes in CI. A local setup guide covers Docker Compose, pytest configuration and coverage tools, with a target of at least eighty per cent coverage. Detailed guides sit in a resources folder.

Capabilities

  • Unit test workflows with time skipping
  • Mock activities in integration tests
  • Replay recorded histories to check determinism
  • Set up a local Temporal test environment