Pular para o conteúdo
Kitbay
Skill

temporal-python-testing

MITAtualizado em 9 de nov. de 202642.406Estrelas no GitHub

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

O que a skill ensina

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.

O que faz

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