Testing
Overview
Test plan for Web Intelligence MCP server covering all tools and integration points.
Test File
/opt/mcp-servers/web/tests/test_plan.md
Test URLs
Safe Test Targets
| URL | Purpose |
|---|---|
| https://example.com | Basic static page |
| https://httpbin.org/html | Simple HTML response |
| https://httpbin.org/links/10 | Multiple links |
| https://httpbin.org/status/200 | Status verification |
| https://httpbin.org/delay/2 | Timeout testing |
Why These URLs?
- example.com - IANA reserved, always available
- httpbin.org - Designed for HTTP testing
- No rate limiting concerns
- Predictable responses
Test Cases (17 Total)
Core Tools (5 tests)
web.status- Returns server infoweb.crawl- Single URL crawlweb.crawl- Multi-page with depthweb.scrape- Single page contentweb.scrape- Error handling (404)
Content Pipeline (4 tests)
web.to_markdown- Basic HTMLweb.to_markdown- Complex tablesweb.extract- CSS selector targetingweb.clean- Script/style removal
Links Integration (3 tests)
web.discover_links- Link extractionweb.save_link- Single saveweb.save_discovered- Batch save
Research (3 tests)
web.research- Basic depthweb.research- Standard depthweb.research- Deep with competitors
Integration (2 tests)
- Full pipeline: crawl → extract → save
- Contact enrichment simulation
Test Execution
Via Gateway
gateway.run([{server:'web', tool:'status', args:{}}])
gateway.run([{server:'web', tool:'scrape', args:{url:'https://example.com'}}])
Expected Results
- All tools return structured JSON
- Errors are handled gracefully
- Timeouts don't crash server
- Rate limiting is respected
Success Criteria
- [ ] All 17 test cases pass
- [ ] No unhandled exceptions
- [ ] Response times within acceptable limits
- [ ] Redis data persists correctly
- [ ] Links integration verified