-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Test with recording for ai search and function tool samples #44249
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
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 pull request adds test recording infrastructure for AI search and function tool samples in the Azure AI Projects SDK. It introduces a new automated testing framework that executes samples dynamically, validates their output, and supports test recordings through the devtools_testutils framework.
Key changes:
- New test infrastructure with
test_tools_samplesmethod to run samples from thesamples/agents/toolsfolder with recording support - Added environment variable
azure_ai_projects_tests_ai_search_user_inputto support non-interactive testing - Modified samples to output standardized result format (
==> Result:) and include cleanup logic
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/tests/test_base.py | Added new environment variable for AI search user input to support automated testing |
| sdk/ai/azure-ai-projects/tests/samples/test_samples.py | Introduced test infrastructure including ArgumentPasser decorator, _get_tools_sample_paths() helper, and test_tools_samples() method for automated sample testing with recordings |
| sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_function_tool.py | Updated output format to use standardized marker and added agent cleanup logic |
| sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_ai_search.py | Added support for optional environment variable input, updated output format, and added cleanup logic |
| sdk/ai/azure-ai-projects/assets.json | Updated test asset tag to reference new recordings |
Comments suppressed due to low confidence (1)
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_ai_search.py:67
- The agent name was changed from "MyAgent" to "MyAgent20". This appears to be a temporary testing change that should not be committed. Consider reverting to the original name "MyAgent" or using a more descriptive name if the change is intentional.
agent_name="MyAgent",
469e929 to
237180f
Compare
237180f to
27cf725
Compare
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:
General Guidelines and Best Practices
Testing Guidelines