|
| 1 | +# Test Plan for Agent365-Python SDK |
| 2 | + |
| 3 | +> **Note:** This plan is under active development. Keep updating as testing progresses. |
| 4 | +
|
| 5 | +**Version:** 1.0 |
| 6 | +**Date:** November 24, 2025 |
| 7 | +**Status:** Draft |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Overview |
| 12 | + |
| 13 | +### Current State |
| 14 | +- ✅ Unit tests exist for `observability` and `runtime` modules |
| 15 | +- ❌ Missing tests for `tooling` and `notifications` modules |
| 16 | +- ❌ No integration tests or CI/CD automation |
| 17 | + |
| 18 | +### Goals |
| 19 | +- Achieve **80%+ code coverage** across all modules |
| 20 | +- Implement integration tests for cross-module functionality |
| 21 | +- Integrate testing into CI/CD pipeline with coverage enforcement |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Testing Strategy |
| 26 | + |
| 27 | +**Framework:** `pytest` |
| 28 | +**Coverage:** `pytest-cov` |
| 29 | +**Mocking:** `unittest.mock` |
| 30 | +**Async:** `pytest-asyncio` |
| 31 | + |
| 32 | +**Test Pattern:** AAA (Arrange → Act → Assert) |
| 33 | +**Naming Convention:** `test_<method>_<condition>_<expected_result>` |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## Implementation Roadmap |
| 38 | + |
| 39 | +| Phase | Deliverables | Priority | |
| 40 | +|-------|-------------|----------| |
| 41 | +| 1.1 | Runtime unit tests | ✅ Complete | |
| 42 | +| 1.2 | Tooling unit tests | HIGH | |
| 43 | +| 1.3 | Notifications unit tests | HIGH | |
| 44 | +| 1.4 | Expand observability tests | MEDIUM | |
| 45 | +| 1.5 | Tooling extension tests | LOW | |
| 46 | +| 2 | Integration tests | MEDIUM | |
| 47 | +| 3 | CI/CD automation | HIGH | |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## Phase 1: Unit Tests |
| 52 | + |
| 53 | +### 1.1 Runtime Module |
| 54 | +**Priority:** HIGH |
| 55 | + |
| 56 | +| Module | Test File | Status | |
| 57 | +|--------|-----------|--------| |
| 58 | +| `power_platform_api_discovery.py` | `test_power_platform_api_discovery.py` | ✅ Complete | |
| 59 | +| `utility.py` | `test_utility.py` | ✅ Complete | |
| 60 | +| `environment_utils.py` | `test_environment_utils.py` | ✅ Complete | |
| 61 | +| `version_utils.py` | `test_version_utils.py` | ✅ Complete | |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +### 1.2 Tooling Module |
| 66 | +**Priority:** HIGH |
| 67 | + |
| 68 | +| Module | Test File | Status | |
| 69 | +|--------|-----------|--------| |
| 70 | +| `utils/utility.py` | `test_utility.py` | ❌ Missing | |
| 71 | +| `models/mcp_server_config.py` | `test_mcp_server_config.py` | ❌ Missing | |
| 72 | +| `services/mcp_tool_server_configuration_service.py` | `test_mcp_tool_server_configuration_service.py` | ❌ Missing | |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +### 1.3 Notifications Module |
| 77 | +**Priority:** HIGH |
| 78 | + |
| 79 | +| Module | Test File | Status | |
| 80 | +|--------|-----------|--------| |
| 81 | +| `models/agent_lifecycle_event.py` | `test_agent_lifecycle_event.py` | ❌ Missing | |
| 82 | +| `models/agent_notification_activity.py` | `test_agent_notification_activity.py` | ❌ Missing | |
| 83 | +| `models/email_reference.py` | `test_email_reference.py` | ❌ Missing | |
| 84 | +| `agent_notification.py` | `test_agent_notification.py` | ❌ Missing | |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +### 1.4 Observability Extensions |
| 89 | +**Priority:** MEDIUM |
| 90 | + |
| 91 | +| Extension | Status | |
| 92 | +|-----------|--------| |
| 93 | +| `agentframework` | ✅ Expand existing | |
| 94 | +| `langchain` | ✅ Expand existing | |
| 95 | +| `openai` | ✅ Expand existing | |
| 96 | +| `semantickernel` | ✅ Expand existing | |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +### 1.5 Tooling Extensions |
| 101 | +**Priority:** LOW |
| 102 | + |
| 103 | +| Extension | Status | |
| 104 | +|-----------|--------| |
| 105 | +| Agent Framework | ❌ Missing | |
| 106 | +| Azure AI Foundry | ❌ Missing | |
| 107 | +| OpenAI | ❌ Missing | |
| 108 | +| Semantic Kernel | ❌ Missing | |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Phase 2: Integration Tests |
| 113 | + |
| 114 | +**Priority:** MEDIUM |
| 115 | + |
| 116 | +| Integration | Status | |
| 117 | +|-------------|--------| |
| 118 | +| Runtime + Observability | ❌ Missing | |
| 119 | +| Tooling + Runtime | ❌ Missing | |
| 120 | +| Notifications + Runtime | ❌ Missing | |
| 121 | +| Agent Framework full flow | ❌ Missing | |
| 122 | +| LangChain full flow | ❌ Missing | |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## Phase 3: CI/CD Integration |
| 127 | + |
| 128 | +**Priority:** HIGH |
| 129 | + |
| 130 | +| Component | Status | |
| 131 | +|-----------|--------| |
| 132 | +| GitHub Actions workflow | ❌ Missing | |
| 133 | +| Python matrix (3.9-3.12) | ❌ Missing | |
| 134 | +| Coverage enforcement (80%+) | ❌ Missing | |
| 135 | +| Codecov integration | ❌ Missing | |
| 136 | +| PR blocking on failures | ❌ Missing | |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +## Success Criteria |
| 141 | + |
| 142 | +- ✅ 80%+ code coverage for all modules |
| 143 | +- ✅ All tests pass independently |
| 144 | +- ✅ Full suite completes in < 30 seconds (unit) / < 5 minutes (full) |
| 145 | +- ✅ Automated test execution on all PRs |
| 146 | +- ✅ Coverage reports visible and enforced |
0 commit comments