Skip to content

Conversation

@howieleung
Copy link
Member

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@howieleung howieleung changed the base branch from howie/sample-recording-6 to main January 3, 2026 02:31
Copilot AI review requested due to automatic review settings January 3, 2026 04:31
@howieleung howieleung force-pushed the howie/sample-recording-8 branch from c8e7bc0 to 75cf61c Compare January 3, 2026 04:31
Copy link
Contributor

Copilot AI left a 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 pull request modernizes the test infrastructure to use a .test.env file for environment variables, replacing the previous prefixed naming scheme (azure_ai_projects_tests_*) with direct environment variable names (e.g., AZURE_AI_PROJECT_ENDPOINT). The changes include custom dotenv loading logic, refactored sample test executors, and comprehensive updates across all test files.

Key Changes

  • Custom .test.env file loading with monkey-patched dotenv module in conftest.py
  • Simplified environment variable names from azure_ai_projects_tests_* prefix to direct names like AZURE_AI_PROJECT_ENDPOINT
  • Refactored sample test infrastructure with new sample_executor.py consolidating sync/async executors and adding additionalSampleTests decorator for optional environment variables

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
tests/conftest.py Adds custom .test.env loading by monkey-patching dotenv module
tests/test_base.py Changes servicePreparer from prefixed names to direct env var names
tests/samples/sample_executor.py New consolidated executor with sync/async classes and additional test support
tests/samples/sample_executor_helpers.py Deleted (functionality moved to sample_executor.py)
tests/samples/test_samples*.py Updated to use new executor API and env var names
tests/samples/README.md Added comprehensive documentation for sample testing
tests/samples/test_samples_helpers.py New file extracting shared test instructions
tests/**/*.py (30+ files) Updated all test files to use new direct env var names
samples/agents/tools/sample_agent_to_agent.py Added optional A2A_USER_INPUT env var support
.gitignore Added .test.env to ignored files
assets.json Updated test recording asset tag

@howieleung howieleung force-pushed the howie/sample-recording-8 branch 2 times, most recently from 6ab2faa to 7a165f9 Compare January 3, 2026 05:30
@howieleung howieleung force-pushed the howie/sample-recording-8 branch 2 times, most recently from cdd449f to 30c2a36 Compare January 3, 2026 06:49
@howieleung howieleung force-pushed the howie/sample-recording-8 branch from 30c2a36 to 19d96b1 Compare January 3, 2026 07:23
@howieleung howieleung closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants