End-to-End (E2E) Automated Tests
Real automated tests that can run in CI/CD without user interaction.
Created Test Files
1. internal-mcps-e2e.test.ts
Tests internal MCPs (Scheduler + MCP Management) functionality.
Status: ⚠️ Needs API fixes (ProfileManager constructor, result.content vs result.data)
Coverage:
- Scheduler tool discovery
- Tool validation
- Schedule listing
- MCP management tools
- Disable/enable functionality
- Error handling
2. cli-integration.test.ts
Tests the actual CLI commands end-to-end.
Status: ✅ Ready to run
Coverage:
- Discovery (find command)
- Tool validation
- Error handling
- Help/version output
- Profile management
- Environment variable handling
Running Tests
bash
# Run all E2E tests
npm run test:e2e
# Run individual test suites
npm run test:e2e:internal-mcps
npm run test:e2e:cli
# Run full CI test suite
npm run test:ciCI/CD Integration
GitHub Actions workflow created at .github/workflows/ci.yml:
- ✅ Runs on Ubuntu + macOS
- ✅ Tests Node 18.x and 20.x
- ✅ Includes critical tests, E2E tests, integration tests, DXT tests
- ✅ Code coverage reporting
- ✅ Type checking
- ✅ DXT package building and validation
Environment Variables for Testing
bash
# Disable user confirmation dialogs in automated tests
export NCP_CONFIRM_BEFORE_RUN=false
# Disable debug output
export NCP_DEBUG=false
# Use isolated config path
export NCP_CONFIG_PATH=/path/to/test/configTODO: Fix Before Running
internal-mcps-e2e.test.ts
- Fix ProfileManager instantiation (doesn't take constructor params)
- Change
result.datatoresult.content - Update test expectations to match actual API
cli-integration.test.ts
- Should work as-is, but needs actual test run to verify
Benefits
- No User Interaction Required - Tests run completely automated
- CI/CD Ready - Can run in GitHub Actions, CircleCI, etc.
- Fast Feedback - Catches issues before deployment
- Comprehensive Coverage - Tests actual user-facing functionality
- Isolated - Each test uses temp directories, no side effects
Next Steps
- Fix the API mismatches in internal-mcps-e2e.test.ts
- Run the tests locally to verify they pass
- Enable the CI/CD workflow in GitHub
- Add more test cases as needed