Python: Add integration tests for durabletask package#3317
Merged
larohra merged 4 commits intomicrosoft:feature-durabletask-pythonfrom Jan 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 |
Member
ahmedmuhsin
approved these changes
Jan 21, 2026
e032133
into
microsoft:feature-durabletask-python
17 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Description
Add integration tests for
durabletaskpackage that will execute our samples and validate they're working fine.Contribution Checklist