# fangbujituan/auto_test_platform architecture

> Architecture diagram of the GitHub repository fangbujituan/auto_test_platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fangbujituan/auto_test_platform
- Repository: https://github.com/fangbujituan/auto_test_platform

## Overview

ATP is a web-based automated testing platform. Users manage projects and test assets in the Vue client, or describe intent through AI; agent workflows can generate cases and scripts, invoke execution, and summarize results. API execution supports requests, variable handling, assertions, and reporting; UI execution uses Playwright. The platform also exposes capabilities through MCP and stores project, test, and result data. The README documents broader API/agent capabilities than the sampled implementation excerpts, so those links follow its stated architecture; the performance engine is planned, not an implemented workflow.

Main entry points: [`app/routes`](https://github.com/fangbujituan/auto_test_platform/tree/main/app/routes) (REST routes), [`app/engine/api_engine/engine.py`](https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/engine.py) (API engine), [`app/models`](https://github.com/fangbujituan/auto_test_platform/tree/main/app/models) (Domain models), [`app/agents/business`](https://github.com/fangbujituan/auto_test_platform/tree/main/app/agents/business) (Business agents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_vue["Vue application<br/>[App.vue]"]
  node_client_api["Client API layer<br/>[request.js]"]
end

subgraph group_platform["Platform API"]
  node_routes["REST routes"]
  node_schemas["Request schemas"]
  node_ai_service["AI service<br/>[ai_service.py]"]
  node_services["Execution services<br/>[executor.py]"]
end

subgraph group_agents["AI workflows"]
  node_agent_workflows["Agent workflows"]
  node_orchestrator["Agent orchestrator<br/>[orchestrator.py]"]
  node_business_agents["Business agents"]
  node_mcp["MCP server<br/>[server.py]"]
end

subgraph group_execution["Test execution"]
  node_api_engine["API engine<br/>[engine.py]"]
  node_api_runner["Sequence runner<br/>[sequence_runner.py]"]
  node_http["HTTP client<br/>[client.py]"]
  node_ui_engine["Playwright UI engine<br/>[executor.py]"]
  node_script_manager["UI script manager<br/>[script_manager.py]"]
end

subgraph group_data["Persistence"]
  node_models["Domain models"]
  node_database[("Platform database")]
end

node_user(("User"))
node_test_target(("Tested services"))
node_llm(("LLM provider"))

node_user -->|"uses"| node_vue
node_vue -->|"requests"| node_client_api
node_client_api -->|"calls"| node_routes
node_routes -->|"validates"| node_schemas
node_routes -->|"invokes"| node_services
node_routes -->|"invokes"| node_ai_service
node_ai_service -.->|"calls"| node_llm
node_routes -->|"starts"| node_agent_workflows
node_agent_workflows -->|"delegates"| node_orchestrator
node_orchestrator -->|"dispatches"| node_business_agents
node_business_agents -->|"requests execution"| node_api_engine
node_business_agents -->|"requests execution"| node_ui_engine
node_api_engine -->|"runs collection"| node_api_runner
node_api_runner -->|"sends requests"| node_http
node_http -->|"exchanges HTTP"| node_test_target
node_ui_engine -->|"loads scripts"| node_script_manager
node_ui_engine -->|"automates browser"| node_test_target
node_services -->|"executes cases"| node_api_engine
node_api_engine -->|"reports results"| node_models
node_routes -->|"queries and updates"| node_models
node_models -->|"persists"| node_database
node_mcp -->|"invokes capabilities"| node_services
node_mcp -->|"queries assets"| node_models

click node_vue "https://github.com/fangbujituan/auto_test_platform/blob/main/client/src/App.vue"
click node_client_api "https://github.com/fangbujituan/auto_test_platform/blob/main/client/src/api/request.js"
click node_routes "https://github.com/fangbujituan/auto_test_platform/tree/main/app/routes"
click node_schemas "https://github.com/fangbujituan/auto_test_platform/tree/main/app/schemas"
click node_ai_service "https://github.com/fangbujituan/auto_test_platform/blob/main/app/services/ai_service.py"
click node_agent_workflows "https://github.com/fangbujituan/auto_test_platform/tree/main/app/agents/workflows"
click node_orchestrator "https://github.com/fangbujituan/auto_test_platform/blob/main/app/agents/orchestration/orchestrator.py"
click node_business_agents "https://github.com/fangbujituan/auto_test_platform/tree/main/app/agents/business"
click node_mcp "https://github.com/fangbujituan/auto_test_platform/blob/main/app/mcp_server/server.py"
click node_api_engine "https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/engine.py"
click node_api_runner "https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/runner/sequence_runner.py"
click node_http "https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/http/client.py"
click node_ui_engine "https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/ui_engine/playwright/executor.py"
click node_script_manager "https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/ui_engine/playwright/script_manager.py"
click node_services "https://github.com/fangbujituan/auto_test_platform/blob/main/app/services/executor.py"
click node_models "https://github.com/fangbujituan/auto_test_platform/tree/main/app/models"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_vue,node_client_api,node_user toneBlue
class node_routes,node_schemas,node_ai_service,node_services toneAmber
class node_agent_workflows,node_orchestrator,node_business_agents,node_mcp toneMint
class node_api_engine,node_api_runner,node_http,node_ui_engine,node_script_manager toneRose
class node_models,node_database,node_test_target,node_llm toneIndigo
```

## Components

### Web client

- [Vue application](https://github.com/fangbujituan/auto_test_platform/blob/main/client/src/App.vue): `client/src/App.vue`
- [Client API layer](https://github.com/fangbujituan/auto_test_platform/blob/main/client/src/api/request.js): `client/src/api/request.js`

### Platform API

- [REST routes](https://github.com/fangbujituan/auto_test_platform/tree/main/app/routes): `app/routes`
- [Request schemas](https://github.com/fangbujituan/auto_test_platform/tree/main/app/schemas): `app/schemas`
- [AI service](https://github.com/fangbujituan/auto_test_platform/blob/main/app/services/ai_service.py): `app/services/ai_service.py`
- [Execution services](https://github.com/fangbujituan/auto_test_platform/blob/main/app/services/executor.py): `app/services/executor.py`

### AI workflows

- [Agent workflows](https://github.com/fangbujituan/auto_test_platform/tree/main/app/agents/workflows): `app/agents/workflows`
- [Agent orchestrator](https://github.com/fangbujituan/auto_test_platform/blob/main/app/agents/orchestration/orchestrator.py): `app/agents/orchestration/orchestrator.py`
- [Business agents](https://github.com/fangbujituan/auto_test_platform/tree/main/app/agents/business): `app/agents/business`
- [MCP server](https://github.com/fangbujituan/auto_test_platform/blob/main/app/mcp_server/server.py): `app/mcp_server/server.py`

### Test execution

- [API engine](https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/engine.py): `app/engine/api_engine/engine.py`
- [Sequence runner](https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/runner/sequence_runner.py): `app/engine/api_engine/runner/sequence_runner.py`
- [HTTP client](https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/api_engine/http/client.py): `app/engine/api_engine/http/client.py`
- [Playwright UI engine](https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/ui_engine/playwright/executor.py): `app/engine/ui_engine/playwright/executor.py`
- [UI script manager](https://github.com/fangbujituan/auto_test_platform/blob/main/app/engine/ui_engine/playwright/script_manager.py): `app/engine/ui_engine/playwright/script_manager.py`

### Persistence

- [Domain models](https://github.com/fangbujituan/auto_test_platform/tree/main/app/models): `app/models`
- **Platform database**

### Other components

- **User**
- **Tested services**
- **LLM provider**

## Connections

- User → Vue application: uses
- Vue application → Client API layer: requests
- Client API layer → REST routes: calls
- REST routes → Request schemas: validates
- REST routes → Execution services: invokes
- REST routes → AI service: invokes
- AI service → LLM provider: calls
- REST routes → Agent workflows: starts
- Agent workflows → Agent orchestrator: delegates
- Agent orchestrator → Business agents: dispatches
- Business agents → API engine: requests execution
- Business agents → Playwright UI engine: requests execution
- API engine → Sequence runner: runs collection
- Sequence runner → HTTP client: sends requests
- HTTP client → Tested services: exchanges HTTP
- Playwright UI engine → UI script manager: loads scripts
- Playwright UI engine → Tested services: automates browser
- Execution services → API engine: executes cases
- API engine → Domain models: reports results
- REST routes → Domain models: queries and updates
- Domain models → Platform database: persists
- MCP server → Execution services: invokes capabilities
- MCP server → Domain models: queries assets
