Open
Conversation
- Add pytest-based test infrastructure with fixtures and mocks - Include MockRegistry for agent registration testing - Include MockAdapter for agent-to-agent messaging testing - Provide AgentTestHarness for complete test environment - Add 20+ example tests covering unit, integration, and e2e scenarios - Add pytest configuration with test markers (unit/integration/slow) This provides production-tested testing patterns for NEST sandbox development, enabling test-driven agent development. All 14 tests passing in 0.04s. Note: Tests added with -f to override gitignore test* pattern, as proper test infrastructure should be version controlled.
srcJin
added a commit
that referenced
this pull request
Dec 5, 2025
(srcJin) Combines generic test fixtures from PR #20 with SimpleAgentBridge tests from PR #24 to prepare for Issue #7 testing infrastructure implementation. Changes: - Merge PR #20's MockRegistry, MockAdapter, and AgentTestHarness into conftest.py - Add PR #20's generic agent pattern tests (14 tests for fixtures validation) - Update pytest.ini with combined markers (unit, integration, slow) - Add PLAN_TEST_RESTRUCTURE.md aligning with Issue #7's 4-layer testing strategy Next step: Restructure tests to match Issue #7's exact requirements: - Unit tests: protocol adapters, router, @mention, AgentFacts, framework adapters - Integration tests: protocol flows, registry client, payment, framework bridge - E2E tests: multi-agent scenarios, agent discovery, cross-framework - Contract tests: A2A compliance, SLIM compliance, x402 payments
srcJin
added a commit
that referenced
this pull request
Dec 5, 2025
Reorganize tests into unit/, integration/, e2e/, contract/, performance/ directories with clear, focused test files. - Unit (12 tests): framework adapters, protocol router, mention routing, message formatting - Integration (7 tests): A2A communication, MCP protocol, incoming messages - Performance (2 tests): large-scale scenarios from PR #20 - Update pytest.ini with all 4-layer markers Test results: 21/22 passing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive pytest-based testing infrastructure for NEST sandbox development.
Problem
NEST currently lacks a proper test framework, making it difficult to:
Solution
This PR adds:
Testing
All 14 tests passing in 0.04s
Usage for Agent Developers
Agent developers can now test their agents:
Test Categories
Note on .gitignore
The tests/ directory was added with
-fflag to override thetest*pattern in .gitignore. Proper test infrastructure should be version controlled. Consider updating .gitignore to allowtests/directory while still ignoring test artifacts.Future Work
Impact
Enables test-driven development for NEST and provides reusable testing patterns for all agent developers using the sandbox.