-
Notifications
You must be signed in to change notification settings - Fork 0
test: add comprehensive E2E test suite for CLI wrapper #7
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
P0 E2E Tests Added: - test_validate_e2e.py: 8 tests for validation command - test_badge_e2e.py: 9 tests for badge issue/verify commands - test_score_e2e.py: 4 tests for scoring (via validation) - test_status_e2e.py: 8 tests for CLI status/version checks Infrastructure: - pytest.ini: E2E test configuration with markers - tests/e2e/conftest.py: Shared fixtures and CLI runner - tests/e2e/fixtures/: Test agent cards (valid, invalid, malformed) - .github/workflows/e2e.yml: E2E test workflow - .github/workflows/test.yml: Updated unit test workflow Reorganized: - tests/unit/: Moved existing unit tests - tests/README.md: Test documentation Total: 29 new E2E tests
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 PR adds a comprehensive E2E test suite for the CLI wrapper, validating P0 CLI commands against the actual capiscio-core binary. The implementation includes 29 new E2E tests across validation, badge, scoring, and status commands, along with supporting test infrastructure and CI/CD workflows.
Key Changes
- Added 29 E2E tests organized into 4 test files covering validate, badge, score, and status commands
- Reorganized tests into
tests/unit/andtests/e2e/directories with comprehensive unit tests for CLI and manager modules - Created test infrastructure including pytest configuration, fixtures, and GitHub Actions workflows for both unit and E2E testing
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Complete dependency lock file with all test and development dependencies |
| pytest.ini | Pytest configuration with markers for E2E and unit tests |
| pyproject.toml | Added test dependencies section for pytest and pytest-cov |
| tests/README.md | Comprehensive documentation for running and configuring tests |
| tests/unit/test_manager.py | Unit tests for the manager module covering platform detection, binary management, and execution |
| tests/unit/test_cli.py | Unit tests for CLI module covering argument passing, wrapper commands, and exit codes |
| tests/e2e/conftest.py | Shared E2E test fixtures for server connection, API configuration, and test data |
| tests/e2e/fixtures/*.json | Test data files including valid, invalid, and malformed agent cards |
| tests/e2e/test_validate_e2e.py | E2E tests for validate command (8 tests) |
| tests/e2e/test_score_e2e.py | E2E tests for score command (4 tests) |
| tests/e2e/test_badge_e2e.py | E2E tests for badge issue/verify commands (9 tests) |
| tests/e2e/test_status_e2e.py | E2E tests for status commands (8 tests) |
| .github/workflows/test.yml | Unit test workflow for multiple Python versions and OS platforms |
| .github/workflows/e2e.yml | E2E test workflow with local server and optional dev environment testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove test_score_e2e.py (CLI has no 'score' command) - Remove test_status_e2e.py (CLI has no 'status' command) - Update conftest.py to remove server dependencies - Fix test_validate_e2e.py to use --schema-only for offline validation - Fix test_badge_e2e.py to use --self-sign and --accept-self-signed - Update valid-agent-card.json to match A2A v1.3.0 schema - Simplify e2e.yml workflow (no longer needs server/postgres) Tests now run entirely offline using CLI features: - badge issue --self-sign - badge verify --accept-self-signed --offline - validate --schema-only
|
✅ All checks passed! Ready for review. |
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
Copilot reviewed 11 out of 14 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unused imports (os, json) from test files - Rename malformed.json to malformed.txt to avoid linter issues - Update tests/README.md to match actual test coverage
|
✅ All checks passed! Ready for review. |
The test was failing on Windows CI because Path('/bin/capiscio')
normalizes to backslashes on Windows. Compare using str(binary_path)
to ensure consistent comparison across platforms.
|
✅ All checks passed! Ready for review. |
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
Copilot reviewed 12 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - ✅ JSON output format | ||
| - ✅ Help command | ||
|
|
||
| ### ├── test_validate_e2e.sue self-signed badge |
Copilot
AI
Dec 27, 2025
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.
Line 58 contains a broken line that appears to be incorrectly formatted: "### ├── test_validate_e2e.sue self-signed badge". This appears to be a copy-paste error or incomplete edit. The section header is malformed and the content doesn't make sense ("sue self-signed badge"). This should likely be removed or replaced with proper documentation about the Badge Command test coverage.
| ### ├── test_validate_e2e.sue self-signed badge | |
| ### Badge Command (`test_badge_e2e.py`) |
| ### Run Specific Test File | ||
|
|
||
| ```bash | ||
| pytest tests/e2scio --cov-report=html |
Copilot
AI
Dec 27, 2025
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.
There's an error in the example command. Line 35 shows pytest tests/e2scio --cov-report=html where "e2scio" should be "e2e". This is a typo in the documentation that would cause the command to fail.
| pytest tests/e2scio --cov-report=html | |
| pytest tests/e2e/ --cov-report=html |
| - name: Run unit tests | ||
| run: | | ||
| pytest tests/unit/ -v --cov=capiscio --cov-report=xml --cov-report=term | ||
| - name: Run E2E tests | ||
| run: | | ||
| pytest tests/e2e/ -v --tb=short | ||
| - name: Upload coverage reports | ||
| if: matrix.python-version == '3.11' | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| file: ./coverage.xml | ||
| flags: unittests | ||
| name: codecov-umbrella | ||
| fail_ci_if_error: false |
Copilot
AI
Dec 27, 2025
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.
The E2E workflow is running unit tests (lines 32-34) in addition to E2E tests. This duplicates the work done in the separate unit test workflow (test.yml). The E2E workflow should only run E2E tests to avoid redundancy and reduce CI time.
| - name: Run unit tests | |
| run: | | |
| pytest tests/unit/ -v --cov=capiscio --cov-report=xml --cov-report=term | |
| - name: Run E2E tests | |
| run: | | |
| pytest tests/e2e/ -v --tb=short | |
| - name: Upload coverage reports | |
| if: matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| - name: Run E2E tests | |
| run: | | |
| pytest tests/e2e/ -v --tb=short |
Summary
Adds comprehensive E2E test suite for the CLI wrapper, validating all P0 CLI commands against the actual
capiscio-corebinary.P0 E2E Tests Added
test_validate_e2e.pytest_badge_e2e.pytest_score_e2e.pytest_status_e2e.pyTotal: 29 new E2E tests
Infrastructure
pytest.ini: E2E test configuration with markerstests/e2e/conftest.py: Shared fixtures and CLI runnertests/e2e/fixtures/: Test agent cards (valid, invalid, malformed).github/workflows/e2e.yml: E2E test workflow.github/workflows/test.yml: Updated unit test workflowChanges
tests/unit/andtests/e2e/directoriestests/README.mdwith test documentationpyproject.tomlwith test dependenciesTesting