Skip to main content
INFORMATIVEACTIVEDocumentation Governance

Test Architecture Overview

Scope

This document defines:

  • Categories of tests in the MPLP repository
  • Directory structure and test locations
  • Mapping between tests and protocol evidence

Non-Goals

  • Test execution instructions (see SDK documentation)
  • CI/CD configuration (see repository .github/workflows/)
  • Test case implementation details

1. Test Categories

MPLP employs a multi-layer testing strategy aligned with the protocol architecture.

CategoryPurposeLocation
Golden FlowsLifecycle validation fixturestests/golden/
Schema AlignmentJSON Schema conformancetests/schema-alignment/
Runtime CompatibilityCross-version runtime teststests/runtime-compat/
Cross-LanguagePython/TS interoperabilitytests/cross-language/
SDK Unit TestsSDK function validationpackages/sources/sdk-ts/tests/
Integration TestsL4 integration validationpackages/npm/integration-*/tests/

2. Golden Flow Tests

Golden Flows provide reference evidence artifacts for protocol conformance evaluation.

Flow IDNameProtocol Layer
GF-01Single-Agent LifecycleL1 Core
GF-02Multi-Agent CoordinationL2 Coordination
GF-03Drift DetectionL3 Runtime
GF-04Delta IntentL2 Coordination
GF-05GovernanceL2 Coordination

Location: tests/golden/flows/

Documentation: Golden Flows


3. Schema Alignment Tests

Schema alignment tests verify that SDK outputs conform to JSON Schema definitions.

What They Validate:

  • Builder outputs match schema structure
  • Required fields are present
  • Enum values are valid

Location: tests/schema-alignment/

Example: ts-schema-alignment.test.ts


4. Runtime Compatibility Tests

Runtime compatibility tests ensure cross-version and cross-package consistency.

What They Validate:

  • Runtime error handling follows protocol patterns
  • SDK-to-runtime handoff preserves data integrity

Location: tests/runtime-compat/


5. Cross-Language Tests

Cross-language tests verify Python and TypeScript SDK interoperability.

What They Validate:

  • Builder outputs are identical across languages
  • Validation logic produces consistent results

Location: tests/cross-language/

SubcategoryPurpose
builders/Builder function consistency
validation/Schema validation consensus

6. Integration Tests

Integration tests validate L4 integration layer components.

Packages with Integration Tests:

PackagePurpose
@mplp/integration-llm-httpLLM HTTP client
@mplp/integration-storage-fsFilesystem storage
@mplp/integration-storage-kvKey-value storage
@mplp/integration-tools-genericGeneric tool executor
@mplp/runtime-minimalMinimal runtime

Location: packages/npm/integration-*/tests/


7. Evidence Mapping

Tests map to protocol conformance dimensions:

Conformance DimensionTest Categories
Schema ValiditySchema Alignment, SDK Unit
Lifecycle CompletenessGolden Flows, Runtime Compat
Trace IntegrityGolden Flows
Governance GatingGF-05


Test Categories: 6
Golden Flows: 5