This directory contains end-to-end tests for the GitHub MCP functionality.
GitHubIntegrationTest: Comprehensive integration tests for GitHub functionality.
- Starts the MCP server programmatically
- Connects to the server using the MCPClient
- Tests both local and remote execution
- Includes mocked tests for predictable results
- Tests parameter validation
- Tests all GitHub operations (issues, PRs, actions, clone, status)
To run the integration tests, use one of the following methods:
- Windows: Run
run-integration-tests.batfrom the github directory - Linux/Mac: Run
run-integration-tests.shfrom the github directory
mvn test -Dtest=GitHubIntegrationTestThe client tests cover:
- Client-server communication
- GitHub API operations:
- Fetching issues
- Fetching pull requests
- Fetching GitHub Actions workflows
- Git operations:
- Cloning repositories
- Checking repository status
The tests use the standard MCPClient class from the tinystruct framework that:
- Connects to the MCP server
- Discovers available resources (tools, data resources, prompts)
- Executes resources with parameters
- Handles errors appropriately
- Some tests might fail if you don't have a valid GitHub token
- The Git clone and status tests use temporary local repositories
- The server is started on port 8000 by default