Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive data-driven testing infrastructure for the Microsoft Agents testing framework. The changes include assertion utilities, selector mechanisms, and a data-driven test runner to facilitate bot testing through configuration files.
Key changes:
- Added assertion framework with field-level and activity-level assertion capabilities
- Implemented selector mechanism for filtering activities based on criteria
- Created data-driven test infrastructure supporting YAML/JSON configuration
- Added comprehensive test coverage for all new functionality
Reviewed Changes
Copilot reviewed 50 out of 60 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Fixed package name from "microsoft-agents-hosting-core" to "microsoft-agents-testing" |
| pytest.ini | Added pytest configuration with warnings, test discovery, and markers |
| microsoft_agents/testing/assertions/* | New assertion framework with type definitions, field/activity checkers, and selectors |
| microsoft_agents/testing/utils/populate.py | Utility functions for populating activities and dicts with defaults |
| microsoft_agents/testing/utils/misc.py | Refactored utility functions (URL parsing, activity normalization) |
| microsoft_agents/testing/integration/data_driven/* | Data-driven test runner implementation |
| tests/assertions/* | Comprehensive tests for assertion framework |
| tests/utils/test_populate.py | Tests for populate utility functions |
| tests/integration/data_driven/test_data_driven_test.py | Tests for data-driven test functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,91 @@ | |||
| # Copyright (c) Microsoft Corporation. All rights reserved. | |||
| # Licensed under the MIT License.s | |||
There was a problem hiding this comment.
Corrected spelling: removed trailing 's' after 'License'.
| :return: The corresponding AssertionQuantifier. | ||
| """ | ||
| value = value.upper() | ||
| if value not in AssertionQuantifier: |
There was a problem hiding this comment.
| @@ -0,0 +1,141 @@ | |||
| import json | |||
There was a problem hiding this comment.
Syntax Error (in Python 3).
|
|
||
| from microsoft_agents.activity import Activity | ||
|
|
||
| from .type_defs import FieldAssertionType, AssertionQuantifier |
There was a problem hiding this comment.
Import of 'AssertionQuantifier' is not used.
| from .type_defs import FieldAssertionType, AssertionQuantifier | |
| from .type_defs import FieldAssertionType |
| from microsoft_agents.testing.utils import ( | ||
| populate_activity, | ||
| update_with_defaults, | ||
| ) |
There was a problem hiding this comment.
Import of 'populate_activity' is not used.
| import asyncio | ||
|
|
||
| from copy import deepcopy | ||
| from typing import Awaitable, Callable |
There was a problem hiding this comment.
Import of 'Awaitable' is not used.
Import of 'Callable' is not used.
| import os | ||
| from unittest.mock import AsyncMock | ||
|
|
||
| from microsoft_agents.activity import Activity, ActivityTypes |
There was a problem hiding this comment.
Import of 'ActivityTypes' is not used.
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| import pytest |
There was a problem hiding this comment.
Import of 'pytest' is not used.
No description provided.