Loading...
Loading...
Comprehensive testing approaches for Temporal workflows using pytest, progressive disclosure resources for specific testing scenarios.
resources/implementation-playbook.md.Recommended Approach (Source: docs.temporal.io/develop/python/testing-suite):
Three Test Types:
This skill provides detailed guidance through progressive disclosure. Load specific resources based on your testing needs:
File: resources/unit-testing.md
When to load: Testing individual workflows or activities in isolation
Contains:
File: resources/integration-testing.md
When to load: Testing workflows with mocked external dependencies
Contains:
File: resources/replay-testing.md
When to load: Validating determinism or deploying workflow changes
Contains:
File: resources/local-setup.md
When to load: Setting up development environment
Contains:
import pytest
from temporalio.testing import WorkflowEnvironment
from temporalio.worker import Worker
@pytest.fixture
async def workflow_env():
env = await WorkflowEnvironment.start_time_skipping()
yield env
await env.shutdown()
@pytest.mark.asyncio
async def test_workflow(workflow_env):
async with Worker(
workflow_env.client,
task_queue="test-queue",
workflows=[YourWorkflow],
activities=[your_activity],
):
result = await workflow_env.client.execute_workflow(
YourWorkflow.run,
args,
id="test-wf-id",
task_queue="test-queue",
)
assert result == expected
from temporalio.testing import ActivityEnvironment
async def test_activity():
env = ActivityEnvironment()
result = await env.run(your_activity, "test-input")
assert result == expected_output
Recommended Coverage (Source: docs.temporal.io best practices):
Load specific resource when needed:
resources/unit-testing.mdresources/integration-testing.mdresources/local-setup.mdresources/replay-testing.mdtemporal-python-testing is an expert AI persona designed to improve your coding workflow. Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures. It provides senior-level context directly within your IDE.
To install the temporal-python-testing skill, download the package, extract the files to your project's .cursor/skills directory, and type @temporal-python-testing in your editor chat to activate the expert instructions.
Yes, the temporal-python-testing AI persona is completely free to download and integrate into compatible Agentic IDEs like Cursor, Windsurf, Github Copilot, and Anthropic MCP servers.
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
Download Skill Package.cursor/skills@temporal-python-testing in editor chat.Copy the instructions from the panel on the left and paste them into your custom instructions setting.
"Adding this temporal-python-testing persona to my Cursor workspace completely changed the quality of code my AI generates. Saves me hours every week."
Developers who downloaded temporal-python-testing also use these elite AI personas.
Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience.
Structured guide for setting up A/B tests with mandatory gates for hypothesis, metrics, and execution readiness.
You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.
Explore our most popular utilities designed for the modern Indian creator.