-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Python: Add integration tests for durabletask package #3317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Add integration tests for durabletask package #3317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive integration tests for the durabletask package. The tests validate that all the getting started samples work correctly by automatically starting worker processes and executing sample scenarios against a Durable Task Scheduler instance.
Changes:
- Added 7 integration test files covering single agent, multi-agent, orchestration, streaming, and human-in-the-loop patterns
- Created test infrastructure (conftest.py, testutils.py) with pytest fixtures for automatic worker process management
- Fixed bugs in sample code including max retry attempt handling in HITL workflows and activity function return types
- Updated API usage from deprecated AgentRunResponse to AgentResponse
- Added comprehensive documentation in README.md and .env.example
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| python/packages/durabletask/tests/integration_tests/conftest.py | Pytest configuration with fixtures for DTS, Redis, and worker process management |
| python/packages/durabletask/tests/integration_tests/testutils.py | Helper utilities for orchestration testing including client creation and wait helpers |
| python/packages/durabletask/tests/integration_tests/README.md | Documentation for running integration tests with setup instructions |
| python/packages/durabletask/tests/integration_tests/.env.example | Example environment configuration file |
| python/packages/durabletask/tests/integration_tests/test_01_single_agent.py | Tests for basic single agent functionality |
| python/packages/durabletask/tests/integration_tests/test_02_multi_agent.py | Tests for multi-agent operations with tool usage |
| python/packages/durabletask/tests/integration_tests/test_03_single_agent_streaming.py | Tests for streaming responses via Redis |
| python/packages/durabletask/tests/integration_tests/test_04_single_agent_orchestration_chaining.py | Tests for agent chaining in orchestrations |
| python/packages/durabletask/tests/integration_tests/test_05_multi_agent_orchestration_concurrency.py | Tests for concurrent multi-agent orchestrations |
| python/packages/durabletask/tests/integration_tests/test_06_multi_agent_orchestration_conditionals.py | Tests for conditional orchestration branching |
| python/packages/durabletask/tests/integration_tests/test_07_single_agent_orchestration_hitl.py | Tests for human-in-the-loop workflows |
| python/samples/getting_started/durabletask/07_single_agent_orchestration_hitl/worker.py | Fixed max retry attempt handling and activity function return types |
| python/samples/getting_started/azure_functions/07_single_agent_orchestration_hitl/function_app.py | Fixed max retry attempt handling |
| python/samples/getting_started/durabletask/04_single_agent_orchestration_chaining/worker.py | Updated AgentRunResponse to AgentResponse |
| python/samples/getting_started/durabletask/03_single_agent_streaming/worker.py | Updated AgentRunResponseUpdate to AgentResponseUpdate |
| python/packages/durabletask/pyproject.toml | Updated version and added pytest markers for integration tests |
| python/packages/durabletask/agent_framework_durabletask/_executors.py | Updated get_run_request API to use options dictionary |
| python/uv.lock | Removed s390x platform wheels for greenlet package |
e032133
into
microsoft:feature-durabletask-python
Motivation and Context
Description
Add integration tests for
durabletaskpackage that will execute our samples and validate they're working fine.Contribution Checklist