Skip to content

test(instrument): tier-2 test ports for ms_agent_framework + strands + pydantic_ai + smolagents (port-as-is)#149

Closed
mmercuri wants to merge 4 commits into
feat/instrument-frameworks-agentsfrom
feat/instrument-tier2-tests-agents-batch
Closed

test(instrument): tier-2 test ports for ms_agent_framework + strands + pydantic_ai + smolagents (port-as-is)#149
mmercuri wants to merge 4 commits into
feat/instrument-frameworks-agentsfrom
feat/instrument-tier2-tests-agents-batch

Conversation

@mmercuri

Copy link
Copy Markdown
Contributor

Summary

Ports the deeper per-adapter test suites from ateam to stratix-python for the four lighter agent-framework adapters that live on feat/instrument-frameworks-agents (PR #97). Strict port-as-is — only the adapter-shim renames described in each module docstring were applied.

Source: A:/github/layerlens/ateam/tests/adapters/<adapter>/ (deeper per-adapter directories with conftest.py, test_lifecycle.py, test_events.py, test_integration.py, plus test_multi_agent.py for two adapters).

Translation rules applied uniformly:

ms_agent_framework

  • Source LOC ported: 1067 (conftest 39, test_events 67, test_integration 761, test_lifecycle 200)
  • Target: tests/instrument/adapters/frameworks/ms_agent_framework/
  • Tests collected: 72
  • Result: 71 passed, 1 skipped (@needs_semantic_kernel marker on test_connect_detects_sdk_version — semantic-kernel not installed in CI venv; port-as-is)

pydantic_ai

  • Source LOC ported: 613 (conftest 39, test_events 65, test_integration 410, test_lifecycle 60, test_multi_agent 39)
  • Target: tests/instrument/adapters/frameworks/pydantic_ai/
  • Tests collected: 19 (test_integration.py is module-level skipped)
  • Result: 19 passed, 1 module skipped (pytest.importorskip("pydantic_ai") — pydantic-ai not installed; port-as-is)

smolagents

  • Source LOC ported: 552 (conftest 39, test_events 65, test_integration 349, test_lifecycle 60, test_multi_agent 39)
  • Target: tests/instrument/adapters/frameworks/smolagents/
  • Tests collected: 19 (test_integration.py is module-level skipped)
  • Result: 19 passed, 1 module skipped (pytest.importorskip("smolagents") — smolagents not installed; port-as-is)

strands

  • Source LOC ported: 625 (conftest 39, test_events 60, test_integration 345, test_lifecycle 181)
  • Target: tests/instrument/adapters/frameworks/strands/
  • Tests collected: 29 (test_integration.py is module-level skipped)
  • Result: 29 passed, 1 module skipped (pytest.importorskip("strands") — strands-agents not installed; port-as-is)

Aggregate

uv run python -m pytest tests/instrument/adapters/frameworks/{ms_agent_framework,pydantic_ai,smolagents,strands}/ -rs

138 passed, 4 skipped in 1.01s

All 4 skips are pytest.importorskip / @needs_<sdk> markers from the source. No tests were silently dropped, none were @pytest.mark.skip-added, and no assertions were weakened. The integration tests will exercise live when the respective optional SDKs are installed in a CI matrix that includes them.

Test plan

  • uv run python -m pytest tests/instrument/adapters/frameworks/ms_agent_framework/ -rs -> 71 pass, 1 skip
  • uv run python -m pytest tests/instrument/adapters/frameworks/pydantic_ai/ -rs -> 19 pass, 1 skip
  • uv run python -m pytest tests/instrument/adapters/frameworks/smolagents/ -rs -> 19 pass, 1 skip
  • uv run python -m pytest tests/instrument/adapters/frameworks/strands/ -rs -> 29 pass, 1 skip
  • All 4 commits build the per-adapter test directory atomically (one commit per adapter) and reuse the existing top-level smoke tests untouched

Rebase note

Once #118 lands, a follow-up sweep PR will rebase the MockStratix.org_id / EventCollector.org_id attribute pattern to the canonical org_id constructor kwarg.

@mmercuri mmercuri requested a review from m-peko May 10, 2026 17:03
@m-peko m-peko closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants