# morganstanley/testplan architecture

> Architecture diagram of the GitHub repository morganstanley/testplan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/morganstanley/testplan
- Repository: https://github.com/morganstanley/testplan

## Overview

##### Main Components

a) Core Testing Framework
- MultiTest Engine (Central component)
- Test Execution Layer
- Assertion System
- Report Generation System

b) Driver System
- Environment Management
- Service Drivers (TCP, HTTP, etc.)
- Resource Management

c) Runner System
- Local Runner
- Pool Runners (Process, Thread)
- Remote Execution

d) Export System
- PDF Exporter
- JSON Exporter
- XML Exporter
- Web UI Interface

##### Component Relationships

**[Test Plan Controller]**
- ↓
**[Test Execution Layer] ←→ [Runner System]**
- ↓                        ↓
**[MultiTest Engine] ←→ [Driver System]**
- ↓
**[Assertion System]**
- ↓
**[Report Generation] →→ [Export System]**

##### Detailed Component Breakdown

For each major component, show:

a) MultiTest Engine:
- Test Suite Management
- Test Case Execution
- Parametrization
- Tagging System

b) Driver System:
- TCP/IP Services
- HTTP Services
- Database Connections
- Custom Drivers

c) Runner System:
- Process Pool
- Thread Pool
- Remote Workers
- Task Distribution

d) Export System:
- Report Templates
- Data Formatters
- UI Components
- Interactive Mode

##### Data Flow Indicators

- Test execution flow (→)
- Data dependencies (⇢)
- Optional connections (--→)
- Bidirectional communication (↔)

##### Implementation Details

Notes for:
- Python version compatibility
- External dependencies
- Plugin architecture
- Extension points

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Core
        TC[Test Plan Controller]
        TEL[Test Execution Layer]
        MTE[MultiTest Engine]
        AS[Assertion System]
    end

    subgraph Runners
        RS[Runner System]
        LR[Local Runner]
        PR[Pool Runners]
        RE[Remote Execution]
    end

    subgraph Drivers
        DS[Driver System]
        EM[Environment Management]
        SD[Service Drivers]
        RM[Resource Management]
    end

    subgraph Reports
        RG[Report Generation]
        ES[Export System]
        PDF[PDF Export]
        JSON[JSON Export]
        XML[XML Export]
        WUI[Web UI Interface]
    end

    %% Core Relationships
    TC --> TEL
    TEL --> MTE
    MTE --> AS
    AS --> RG

    %% Runner Relationships
    TEL <--> RS
    RS --> LR
    RS --> PR
    RS --> RE

    %% Driver Relationships
    MTE <--> DS
    DS --> EM
    DS --> SD
    DS --> RM

    %% Export Relationships
    RG --> ES
    ES --> PDF
    ES --> JSON
    ES --> XML
    ES --> WUI

    %% Styling
    classDef core fill:#a8d5ff
    classDef runner fill:#98ff98
    classDef driver fill:#fff59d
    classDef report fill:#ffb74d
    classDef interface fill:#e1bee7

    class TC,TEL,MTE,AS core
    class RS,LR,PR,RE runner
    class DS,EM,SD,RM driver
    class RG,ES,PDF,JSON,XML,WUI report

    %% Click Events
    click TEL "https://github.com/morganstanley/testplan/blob/main/testplan/testing/base.py"
    click MTE "https://github.com/morganstanley/testplan/blob/main/testplan/testing/multitest/base.py"
    click AS "https://github.com/morganstanley/testplan/blob/main/testplan/testing/multitest/entries/assertions.py"
    click RG "https://github.com/morganstanley/testplan/blob/main/testplan/report/testing/base.py"
    click EM "https://github.com/morganstanley/testplan/blob/main/testplan/testing/environment/base.py"
    click SD "https://github.com/morganstanley/testplan/tree/main/testplan/testing/multitest/driver/"
    click RM "https://github.com/morganstanley/testplan/blob/main/testplan/common/entity/base.py"
    click LR "https://github.com/morganstanley/testplan/blob/main/testplan/runners/local.py"
    click PR "https://github.com/morganstanley/testplan/blob/main/testplan/runners/pools/base.py"
    click RE "https://github.com/morganstanley/testplan/blob/main/testplan/runners/pools/remote.py"
    click PDF "https://github.com/morganstanley/testplan/blob/main/testplan/exporters/testing/pdf/__init__.py"
    click JSON "https://github.com/morganstanley/testplan/blob/main/testplan/exporters/testing/json/base.py"
    click XML "https://github.com/morganstanley/testplan/blob/main/testplan/exporters/testing/xml/__init__.py"
    click WUI "https://github.com/morganstanley/testplan/tree/main/testplan/web_ui/testing/"
```
