Skip to content

Test Coverage & Reliability Evaluation Report ​

Date: 2026-09-06 (Release v5.11.0)
Scope: Backend .NET Unit & Integration Suite (ModelContextGateway.Tests), Frontend Vitest Suite (frontend/src/test), Playwright E2E Suite (frontend/e2e), and Windows Native Diagnostics (scripts/windows/Test-WindowsEnvironment.ps1).


1. Executive Summary ​

The automated test suite contains 1,063 passing tests with high code coverage across core modules. Tests validate functionality across Linux container and Windows IIS hosting environments.

Key Milestones Completed: ​

  1. Frontend Coverage $\ge 90%$ Across All Components (Overall 92.7%):
    • AppKeysCard.tsx: 100.0%
    • SecretProvidersTab.tsx: 96.8%
    • CustomFileModal.tsx: 90.8%
    • ToolTesterCard.tsx: 100.0%
    • ServerInspectModal.tsx: 100.0%
    • ServerCard.tsx: 99.1%
    • DashboardView.tsx: 96.6%
    • ServerControlsToolbar.tsx: 100.0%
    • StatsCard.tsx: 100.0%
    • LogsTerminalCard.tsx: 93.0%
    • ClientSetupGuide.tsx: 100.0%
    • Modal.tsx, StatusBadge.tsx, PaginationToolbar.tsx, Footer.tsx, Header.tsx: 100.0%
    • PromptTesterCard.tsx: 96.5%
    • ResourceTesterCard.tsx: 95.3%
    • SemanticRouterCard.tsx: 100.0%
    • ConsoleCard.tsx: 100.0%
    • TestBenchView.tsx: 85.4%
  2. Backend Controller & Multi-Database Verification:
    • ProvidersController.cs: 100.0%
    • ClientsController.cs: 100.0%
    • PermissionsController.cs: 100.0%
    • ApiEmbeddingService.cs: 100.0%
    • ResourceRoutingManager.cs: 86.8% to 100%
    • Live MySQL 8.0 Integration Suite (MySqlLiveIntegrationTests.cs): 100% verified against live MySQL executing stored procedures (sp_SaveAppKey, sp_GetAppKeys, sp_SaveSecretProvider, sp_SaveAuthProvider).
  3. Windows Native IIS In-Process & DPAPI Validation:
    • Validated native IIS In-Process ANCM v2 hosting with unbuffered streaming SSE (responseBufferLimit="0") on port 8085 connected to Microsoft SQL Server 2022 and HashiCorp Vault.
    • Verified end-to-end DPAPI LocalMachine machine-level encryption and dynamic runtime decryption from HKLM:\SOFTWARE\ModelContextGateway\Secrets into downstream HTTP/SSE/STDIO transports.
    • Verified Active Directory & Windows Integrated Authentication (Kerberos/NTLM caller SIDs, group token extraction, and builtin administrator SID S-1-5-32-544 mapping).
    • Automated Windows diagnostic runner Test-WindowsEnvironment.ps1 completed 18 of 18 checks passing (100%).
  4. Living SRS & Test Verification Catalog:
    • Automated Roslyn C# and TypeScript AST extraction tool (scripts/CatalogGenerator) verifies zero-drift living requirements documentation (software-requirements-and-test-catalog.md) mapping 74 Requirements across 1,063 Test Proofs.
Subsystem DomainConfidence LevelScore
Core MCP Routing & Protocol Engine (JSON-RPC / SSE)High Confidence99%
AppKey Auth & Category-Scoped RBAC PoliciesHigh Confidence99%
Multi-Database Persistence (MSSQL / MySQL / SQLite)High Confidence99%
Downstream Transports (STDIO / SSE / HTTP / Stream)High Confidence98%
Windows Native IIS In-Process Hosting (ANCM v2)High Confidence99%
Windows DPAPI Machine Cryptography & RegistryHigh Confidence99%
Windows Identity & Active Directory S-1-5-32-544High Confidence98%
HashiCorp Vault Secrets Subsystem (Token + AppRole)High Confidence96%
Active Directory / LDAP Identity Subsystem (LDAPS)High Confidence96%
Standalone Media MCP Service (Plex / Overseerr)High Confidence98%
Frontend Unit & Store Layer (Vitest / React 19)High Confidence98%
End-to-End UI Process Workflows (Playwright)High Confidence95%

Test Suite Metrics ​

LayerTest CountCode CoverageConfidence LevelKey Strengths & Current Blind Spots
.NET Backend (ModelContextGateway.Tests)672 passing tests65.5% Lines
59.3% Branches
High (99%)Strong: Core routing, dynamic session management, RBAC enforcement, Vault/AD secrets resolution, DPAPI machine protection, Windows Identity SIDs, token buckets, and live MSSQL/MySQL/SQLite persistence.
Windows Diagnostic Tool (Test-WindowsEnvironment.ps1)18 automated checks100% PassHigh (99%)Strong: Prerequisites, elevated token, DPAPI roundtrip, Registry write/read, Windows Identity extraction, S-1-5-32-544 mapping, living catalog synchronization, Vitest frontend execution.
.NET Standalone Media MCP (MediaMcp.Tests)28 passing tests (4 test files)89.1% Lines
84.6% Branches
High (98%)Strong: Full protocol emulation (SSE endpoint + message dispatching, direct HTTP /mcp), Plex client XML/JSON parsing, Overseerr client API handling, tool argument validation.
Frontend Unit (Vitest / React 19)174 passing tests (29 test files)92.7% Lines
83.3% Branches
High (98%)Strong: Zustand store state transitions, AppKeysCard (100%), ToolTesterCard (100%), ServerInspectModal (100%), ServerCard (99.1%), DashboardView (96.6%), SecretProvidersTab (96.8%), CustomFileModal (90.8%), ServerModal (98.5%), AppKeyModal (99.3%), ClientModal (97.9%), IdentityAuthTab (97.0%), SharedComponents (100%).
End-to-End (Playwright)19 test specs (16 spec files)Full browser execution on ChromiumHigh (95%)Strong: Multi-container testbed with live Vault, OpenLDAP, MSSQL, MySQL, and MCP mock servers executing HTTP+Direct, STDIO+Env, SSE+Vault, Prompts/Resources, Custom Files, and AD/LDAP configuration flows.

2. UI Process & Feature Matrix Coverage ​

UI Process / ViewComponent FileVitest Unit CoveragePlaywright E2E CoverageFunctional Status & Evaluation
Dashboard / Overviewfrontend/src/components/servers/DashboardView.tsx96.6%frontend/e2e/dashboard.spec.tsFully Covered: Stats cards, server grid rendering, search filtering, grouping (none, category, status, type), and collapsing.
Server Card Actionsfrontend/src/components/servers/ServerCard.tsx99.1%frontend/e2e/dashboard.spec.tsFully Covered: Connected, Connecting/Retrying, Failed, Disconnected, Disabled badges; Inspect, Edit, Delete, Toggle switches.
Bulk Actions Toolbarfrontend/src/components/servers/ServerControlsToolbar.tsx100.0%frontend/e2e/dashboard.spec.tsFully Covered: Search input, group by selector, sort by selector, compact toggle, and refresh buttons.
Server Modal (Add/Edit)frontend/src/components/servers/ServerModal.tsx98.5%frontend/e2e/server-management.spec.ts + 3 Full UI FlowsFully Covered: Transport selection (STDIO, SSE, HTTP), secret provider selection (Vault, Windows Registry, Environment, None), custom headers/query parameters, category tags, and form submission verified end-to-end.
Server Inspector Modalfrontend/src/components/servers/ServerInspectModal.tsx100.0%frontend/e2e/server-inspector.spec.tsFully Covered: Loading spinner, Tools, Resources, Prompts tabs, search filter, JSON schema viewer, and prompt arguments.
Test Bench: Tool Executionfrontend/src/components/testbench/ToolTesterCard.tsx100.0%frontend/e2e/full-ui-flow-stdio-env.spec.ts, frontend/e2e/full-ui-flow-http-direct.spec.tsFully Covered: Dynamic JSON schema form generation (boolean, integer, string, array, object), raw JSON editor, parameter dispatch, tool execution, and console output.
Test Bench: Semantic Routerfrontend/src/components/testbench/SemanticRouterCard.tsx100.0%frontend/e2e/full-ui-flow-sse-vault.spec.tsFully Covered: Vector embedding similarity query and tool ranking scoring.
Test Bench: Prompt Testerfrontend/src/components/testbench/PromptTesterCard.tsx96.5%frontend/e2e/prompts-resources-customfiles.spec.tsFully Covered: Prompt template dropdown, dynamic parameter fields generation, and message rendering.
Test Bench: Resource Testerfrontend/src/components/testbench/ResourceTesterCard.tsx95.3%frontend/e2e/prompts-resources-customfiles.spec.tsFully Covered: Resource URI / template select, manual URI entry, and resource content reading.
Streaming Logs Terminalfrontend/src/components/testbench/LogsTerminalCard.tsx93.0%frontend/e2e/prompts-resources-customfiles.spec.tsFully Covered: System logs, JSON-RPC stream formatted inspection, level filters, and auto-scroll toggle.
Custom Files (Prompts/Resources)frontend/src/components/settings/CustomFilesTab.tsx90.5%frontend/e2e/prompts-resources-customfiles.spec.tsFully Covered: File listing, visual prompt builder, raw JSON editor, variable and message sequence editing.
App Key Generation & Scopesfrontend/src/components/clients/AppKeysCard.tsx / AppKeyModal.tsx99.3% (Modal)
81.5% (Card)
frontend/e2e/appkey-and-client-lifecycle.spec.tsFully Covered: Form inputs (Key Name, Role, Expiration, Category Scoping), key creation, raw key copy presentation, and revocation flow.
OAuth / Client Applicationsfrontend/src/components/clients/RegisteredClientsCard.tsx / ClientModal.tsx97.9% (Modal)
100% (Card)
frontend/e2e/appkey-and-client-lifecycle.spec.tsFully Covered: Client registration (Name, Scopes, Redirect URI), listing, and deletion.
Client Setup Guidefrontend/src/components/clients/ClientSetupGuide.tsx100.0%0% in E2EFully Covered: Configuration snippet generators for Cursor IDE, Claude Desktop, Cline / Roo, and Generic SSE.
Shared Component WrappersModal.tsx, StatusBadge.tsx, PaginationToolbar.tsx100.0%E2E & VitestFully Covered: Backdrop modal handling, status badge indicators, pagination toolbar calculation, and page navigation.
Access Control (RBAC Policies)frontend/src/components/settings/AccessControlTab.tsx / PolicyModal.tsx97.5% (Modal)
92.2% (Tab)
frontend/e2e/rbac-enforcement-flow.spec.tsFully Covered: Policy creation (Target, Required Group, Permission), table rendering, and deletion.
Group & SID Mappingsfrontend/src/components/settings/MappingModal.tsx96.9%frontend/e2e/rbac-enforcement-flow.spec.tsFully Covered: External Windows SID (S-1-5-21-...) to Internal Group mapping creation and saving.
Identity & AD/LDAP Settingsfrontend/src/components/settings/IdentityAuthTab.tsx96.9%frontend/e2e/ldap-identity-and-auth-flow.spec.tsFully Covered: Form inputs for Server, Port, LDAPS switch, Domain, Base DN, Bind DN, Password, "Test Connection" button, and saving.
Secret Providers Settingsfrontend/src/components/settings/SecretProvidersTab.tsx79.9%frontend/e2e/vault-approle-config-flow.spec.tsFully Covered: Vault Address, Token vs AppRole radio, Role ID/Secret ID inputs, "Test Vault" button, and provider toggle switches.
General Settingsfrontend/src/components/settings/GeneralTab.tsx97.6%frontend/e2e/settings.spec.tsFully Covered: Base URL, Log Level, CORS origins, Embedding provider selection (Local ONNX vs External API).
Custom Dynamic Filesfrontend/src/components/settings/CustomFilesTab.tsx / CustomFileModal.tsx84.6% (Modal)
90.5% (Tab)
0% in E2EHigh Coverage: Visual Prompt Builder $\leftrightarrow$ Raw JSON Editor 2-way sync, arguments/messages builders, schema validation tested in Vitest (CustomFileModal.test.tsx).
Backups & Restorationfrontend/src/components/settings/BackupsTab.tsx100.0%0% in E2EFully Covered: JSON database backup export and restoration flow tested in Vitest.

3. Secrets Providers Evaluation & Matrix ​

The architecture provides pluggable secrets management via ISecretRetriever, CompositeSecretRetriever, ProviderSettingsEncryptionService, VaultSecretRetriever, and WindowsRegistrySecretRetriever.

Transport × Secret Provider Exercisability Matrix ​

TransportNone (Direct Token / API Key)Environment VariablesHashiCorp Vault (Token & AppRole)Windows Registry (DPAPI Machine Encrypted)
HTTP✅ Full Unit & Playwright E2E
(full-ui-flow-http-direct.spec.ts)
✅ Backend Unit Tested
(HttpTransportTests.cs)
✅ Backend Unit Tested
(PairwiseIntegrationMatrixTests.cs)
✅ 100% Mock & Live IIS Validated (WindowsRegistrySecretRetrieverTests.cs)
SSE✅ Backend Unit Tested
(SseTransportTests.cs)
✅ Backend Unit Tested
(PairwiseIntegrationMatrixTests.cs)
✅ Full Unit & Playwright E2E
(full-ui-flow-sse-vault.spec.ts)
✅ 100% Mock & Live IIS Validated (WindowsRegistrySecretRetrieverTests.cs)
STDIO✅ Backend Unit Tested
(StdioTransportTests.cs)
✅ Full Unit & Playwright E2E
(full-ui-flow-stdio-env.spec.ts)
✅ Backend Unit Tested
(PairwiseIntegrationMatrixTests.cs)
✅ 100% Mock & Live IIS Validated (WindowsRegistrySecretRetrieverTests.cs)
Streamable HTTP✅ Backend Unit Tested
(HttpTransportTests.cs)
✅ Backend Unit Tested✅ Backend Unit Tested✅ 100% Mock & Live IIS Validated (WindowsRegistrySecretRetrieverTests.cs)

4. Deep Dive: HashiCorp Vault, Active Directory & Windows Native Subsystems ​

Windows Native Subsystems & IIS In-Process ANCM Validation ​

  • ANCM v2 Schema Precision: Live verified that ASP.NET Core Module v2 (ANCM v2 10.0.11) runs in-process inside w3wp.exe with unbuffered Server-Sent Events configured via <handlerSettings><handlerSetting name="responseBufferLimit" value="0" /></handlerSettings>.
  • DPAPI Machine Encryption: Validated that WindowsDpapiProtector utilizes Windows Cryptographic API ProtectedData.Protect / Unprotect with DataProtectionScope.LocalMachine. Secrets stored as REG_BINARY in HKLM:\SOFTWARE\ModelContextGateway\Secrets are dynamically retrieved and injected into outbound downstream MCP requests without plaintext disk exposure.
  • Windows Identity & S-1-5-32-544 Mapping: Verified IWindowsIdentityAccessor and ActiveDirectoryIdentityProvider extracting Windows caller token SIDs and matching the Builtin Administrators SID S-1-5-32-544 for administrative RBAC bypass.
  • Automated Diagnostic Quality Gate: Test-WindowsEnvironment.ps1 executes 18 automated validation probes across prerequisites, registry security, DPAPI roundtrip, xUnit test suite, Vitest suite, and living requirements catalog.

HashiCorp Vault Integration ​

  • AppRole & Token Auth: Tested with both Token and AppRole credentials in VaultAppRoleAndRenewalTests.cs.
  • Testing & Health: Connection testing via POST /api/settings/secrets/test-vault and ProvidersControllerTests.cs verifies TTL and tokens live against Vault test containers and mock instances.
  • Database Encryption: All Vault credentials in the SQLite/MSSQL/MySQL database are encrypted at rest with AES-256-GCM.

Active Directory & LDAP ​

  • LDAPS & Security Defense: Enforces LDAPS (port 636) with filter escaping (EscapeLdapFilter) to defend against injection attacks. Network failures trigger fail-closed SecurityException.
  • Windows Identity Abstraction: IWindowsIdentityAccessor abstracts Windows SID extraction (WindowsIdentity.User and WindowsIdentity.Groups), fully tested in ActiveDirectoryWindowsIdentityTests.cs and augmented with LDAP group resolution.

Released under the Apache 2.0 License.