Testing
Tests
Personal-data, map, repository, library, faculty, news, and service fixtures are synthetic. Timetable fixtures use fictional course labels and indexes while retaining the HTML structures needed for parser tests. Opt-in live tests print counts and statuses; they do not save academic records or learning materials in the repository.
The offline tests cover keyring storage and failure handling, local credential prompts, session recovery, parsing, scheduling, lossless compaction, output-schema validation, tool calls/errors, and resource discovery. Protocol tests use Python SDK clients and an independent JSON-RPC client over stdio, including protocol versions 2025-06-18 and 2025-11-25:
uv run python -m unittest discover -s tests -t . -v
An optional check uses the official TypeScript SDK. Node dependencies stay in a temporary directory:
NTU_MCP_TEST_SDK="$(mktemp -d)"
npm install --prefix "$NTU_MCP_TEST_SDK" --ignore-scripts --no-audit --no-fund @modelcontextprotocol/sdk@1.32.1
uv run node tests/mcp/typescript_smoke.mjs "$NTU_MCP_TEST_SDK"
These interoperability checks use offline fixtures and never edit saved plans.
Hosted HTTP checks cover public-only registration, rejected personal calls, output schemas, both modern and legacy Python SDK clients, Host/Origin validation, request-size limits, and independent serverless event loops. See the HTTP test instructions for the TypeScript client and opt-in live smoke.
Live checks and service-specific testing instructions: STARS · NTULearn · CareerAxis · MazeMap · DR-NTU · Library · Faculty · News · Campus services · NTU Omnibus · One Stop @ SAC.