Zum Inhalt springen
Kitbay
Skill

temporal-python-testing

MITAktualisiert am 9. Nov. 202642.406GitHub-Sterne

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

Was der Skill vermittelt

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.

Funktionen

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