# liwanlei/fxtest architecture

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

- Interactive diagram: https://gitdiagram.com/liwanlei/fxtest
- Repository: https://github.com/liwanlei/fxtest

## Overview

FXTest is a Flask-based interface-test management and execution platform. Users manage projects, interfaces, environments, cases, and schedules through web views; a run request reaches the test runner, which calls APIs, checks responses (and optionally database state), and records results. The repository also documents Mock, report notifications, and JMeter-based load testing. Some documented subsystems are represented from README claims because their implementation was not sampled; duplicate top-level and app/ trees make their active wiring uncertain.

Main entry points: [`app/test_case/new_unittest_case.py`](https://github.com/liwanlei/fxtest/blob/master/app/test_case/new_unittest_case.py) (Test case engine), [`app/models`](https://github.com/liwanlei/fxtest/tree/master/app/models) (Domain records), [`app/Interface/views.py`](https://github.com/liwanlei/fxtest/blob/master/app/Interface/views.py) (Interface management), [`app/__init__.py`](https://github.com/liwanlei/fxtest/blob/master/app/__init__.py) (Flask app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web management"]
  node_flask["Flask app<br/>[__init__.py]"]
  node_home["Home and projects<br/>[views.py]"]
  node_resources["Resource administration"]
  node_interfaces["Interface management<br/>[views.py]"]
  node_cases["Case management<br/>[views.py]"]
  node_tasks["Scheduled tasks<br/>[views.py]"]
  node_accounts["User management<br/>[views.py]"]
  node_forms["Forms and validation<br/>[forms.py]"]
end

subgraph group_domain["Test domain"]
  node_models["Domain records"]
  node_caseops["Case operations"]
end

subgraph group_runtime["Execution runtime"]
  node_testengine["Test case engine"]
  node_runner["Suite runner<br/>[bs_test_runner.py]"]
  node_api["API client<br/>[api_client.py]"]
  node_assertions["Assertions<br/>[assertions.py]"]
  node_dictutils["Response utilities<br/>[dict_utils.py]"]
end

subgraph group_integrations["Integrations and state"]
  node_mysql["Database checks<br/>[mysql_client.py]"]
  node_redis[("Redis state<br/>[redis_client.py]")]
  node_scheduler["Scheduler configuration<br/>[config.py]"]
  node_mock["Mock service<br/>[mock_server.py]"]
  node_reports["Reports and notifications"]
  node_excel["Excel import/export<br/>[excel_parser.py]"]
  node_excelwrite["Excel generation<br/>[excel_utils.py]"]
  node_jmx["JMeter generation<br/>[jmx_builder.py]"]
  node_ssh["Remote execution<br/>[ssh_tools.py]"]
  node_storage[("SQL database")]
end

node_user(("Platform user"))

node_user -->|"uses"| node_flask
node_flask -->|"registers"| node_home
node_flask -->|"initializes"| node_models
node_home -->|"queries"| node_models
node_home -->|"reads"| node_redis
node_user -->|"manages APIs"| node_interfaces
node_interfaces -->|"uses"| node_models
node_interfaces -->|"imports"| node_excel
node_interfaces -->|"exports"| node_excelwrite
node_user -->|"creates and runs"| node_cases
node_cases -->|"uses"| node_models
node_cases -.->|"delegates"| node_caseops
node_user -->|"schedules runs"| node_tasks
node_tasks -->|"invokes"| node_testengine
node_tasks -->|"runs suites"| node_runner
node_testengine -->|"sends requests"| node_api
node_testengine -->|"checks results"| node_assertions
node_testengine -->|"extracts fields"| node_dictutils
node_testengine -->|"queries database"| node_mysql
node_testengine -->|"stores results"| node_redis
node_api -->|"HTTP requests"| node_storage
node_scheduler -->|"persists jobs"| node_redis
node_user -->|"configures mocks"| node_mock
node_user -->|"receives reports"| node_reports
node_user -->|"converts cases"| node_jmx
node_jmx -.->|"remote execution"| node_ssh
node_user -->|"manages access"| node_accounts
node_accounts -->|"uses"| node_models
node_forms -->|"validates fields"| node_models

click node_flask "https://github.com/liwanlei/fxtest/blob/master/app/__init__.py"
click node_home "https://github.com/liwanlei/fxtest/blob/master/app/home/views.py"
click node_resources "https://github.com/liwanlei/fxtest/tree/master/app/home/resource_views"
click node_interfaces "https://github.com/liwanlei/fxtest/blob/master/app/Interface/views.py"
click node_cases "https://github.com/liwanlei/fxtest/blob/master/app/case/views.py"
click node_tasks "https://github.com/liwanlei/fxtest/blob/master/app/task/views.py"
click node_accounts "https://github.com/liwanlei/fxtest/blob/master/app/users/views.py"
click node_forms "https://github.com/liwanlei/fxtest/blob/master/app/forms.py"
click node_models "https://github.com/liwanlei/fxtest/tree/master/app/models"
click node_caseops "https://github.com/liwanlei/fxtest/tree/master/app/case/case_operations"
click node_testengine "https://github.com/liwanlei/fxtest/blob/master/app/test_case/new_unittest_case.py"
click node_runner "https://github.com/liwanlei/fxtest/blob/master/common/bs_test_runner.py"
click node_api "https://github.com/liwanlei/fxtest/blob/master/common/api_client.py"
click node_assertions "https://github.com/liwanlei/fxtest/blob/master/common/assertions.py"
click node_dictutils "https://github.com/liwanlei/fxtest/blob/master/common/dict_utils.py"
click node_mysql "https://github.com/liwanlei/fxtest/blob/master/common/mysql_client.py"
click node_redis "https://github.com/liwanlei/fxtest/blob/master/common/redis_client.py"
click node_scheduler "https://github.com/liwanlei/fxtest/blob/master/config.py"
click node_mock "https://github.com/liwanlei/fxtest/blob/master/common/mock_server.py"
click node_reports "https://github.com/liwanlei/fxtest/blob/master/common/html_test_report.py"
click node_excel "https://github.com/liwanlei/fxtest/blob/master/common/excel_parser.py"
click node_excelwrite "https://github.com/liwanlei/fxtest/blob/master/common/excel_utils.py"
click node_jmx "https://github.com/liwanlei/fxtest/blob/master/common/jmx_builder.py"
click node_ssh "https://github.com/liwanlei/fxtest/blob/master/common/ssh_tools.py"

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_flask,node_home,node_resources,node_interfaces,node_cases,node_tasks,node_accounts,node_forms,node_user toneBlue
class node_models,node_caseops toneAmber
class node_testengine,node_runner,node_api,node_assertions,node_dictutils toneMint
class node_mysql,node_redis,node_scheduler,node_mock,node_reports,node_excel,node_excelwrite,node_jmx,node_ssh,node_storage toneRose
```

## Components

### Web management

- [Flask app](https://github.com/liwanlei/fxtest/blob/master/app/__init__.py): `app/__init__.py`
- [Home and projects](https://github.com/liwanlei/fxtest/blob/master/app/home/views.py): `app/home/views.py`
- [Resource administration](https://github.com/liwanlei/fxtest/tree/master/app/home/resource_views): `app/home/resource_views`
- [Interface management](https://github.com/liwanlei/fxtest/blob/master/app/Interface/views.py): `app/Interface/views.py`
- [Case management](https://github.com/liwanlei/fxtest/blob/master/app/case/views.py): `app/case/views.py`
- [Scheduled tasks](https://github.com/liwanlei/fxtest/blob/master/app/task/views.py): `app/task/views.py`
- [User management](https://github.com/liwanlei/fxtest/blob/master/app/users/views.py): `app/users/views.py`
- [Forms and validation](https://github.com/liwanlei/fxtest/blob/master/app/forms.py): `app/forms.py`

### Test domain

- [Domain records](https://github.com/liwanlei/fxtest/tree/master/app/models): `app/models`
- [Case operations](https://github.com/liwanlei/fxtest/tree/master/app/case/case_operations): `app/case/case_operations`

### Execution runtime

- [Test case engine](https://github.com/liwanlei/fxtest/blob/master/app/test_case/new_unittest_case.py): `app/test_case/new_unittest_case.py`
- [Suite runner](https://github.com/liwanlei/fxtest/blob/master/common/bs_test_runner.py): `common/bs_test_runner.py`
- [API client](https://github.com/liwanlei/fxtest/blob/master/common/api_client.py): `common/api_client.py`
- [Assertions](https://github.com/liwanlei/fxtest/blob/master/common/assertions.py): `common/assertions.py`
- [Response utilities](https://github.com/liwanlei/fxtest/blob/master/common/dict_utils.py): `common/dict_utils.py`

### Integrations and state

- [Database checks](https://github.com/liwanlei/fxtest/blob/master/common/mysql_client.py): `common/mysql_client.py`
- [Redis state](https://github.com/liwanlei/fxtest/blob/master/common/redis_client.py): `common/redis_client.py`
- [Scheduler configuration](https://github.com/liwanlei/fxtest/blob/master/config.py): `config.py`
- [Mock service](https://github.com/liwanlei/fxtest/blob/master/common/mock_server.py): `common/mock_server.py`
- [Reports and notifications](https://github.com/liwanlei/fxtest/blob/master/common/html_test_report.py): `common/html_test_report.py`
- [Excel import/export](https://github.com/liwanlei/fxtest/blob/master/common/excel_parser.py): `common/excel_parser.py`
- [Excel generation](https://github.com/liwanlei/fxtest/blob/master/common/excel_utils.py): `common/excel_utils.py`
- [JMeter generation](https://github.com/liwanlei/fxtest/blob/master/common/jmx_builder.py): `common/jmx_builder.py`
- [Remote execution](https://github.com/liwanlei/fxtest/blob/master/common/ssh_tools.py): `common/ssh_tools.py`
- **SQL database**

### Other components

- **Platform user**

## Connections

- Platform user → Flask app: uses (evidence: `README.md`)
- Flask app → Home and projects: registers (evidence: `app/__init__.py`)
- Flask app → Domain records: initializes (evidence: `app/__init__.py`)
- Home and projects → Domain records: queries (evidence: `app/home/views.py`)
- Home and projects → Redis state: reads (evidence: `app/home/views.py`)
- Platform user → Interface management: manages APIs (evidence: `README.md`)
- Interface management → Domain records: uses (evidence: `app/Interface/views.py`)
- Interface management → Excel import/export: imports (evidence: `app/Interface/views.py`)
- Interface management → Excel generation: exports (evidence: `app/Interface/views.py`)
- Platform user → Case management: creates and runs (evidence: `README.md`)
- Case management → Domain records: uses (evidence: `app/case/views.py`)
- Case management → Case operations: delegates
- Platform user → Scheduled tasks: schedules runs (evidence: `README.md`)
- Scheduled tasks → Test case engine: invokes (evidence: `app/task/views.py`)
- Scheduled tasks → Suite runner: runs suites (evidence: `app/task/views.py`)
- Test case engine → API client: sends requests (evidence: `app/test_case/new_unittest_case.py`)
- Test case engine → Assertions: checks results (evidence: `app/test_case/new_unittest_case.py`)
- Test case engine → Response utilities: extracts fields (evidence: `app/test_case/new_unittest_case.py`)
- Test case engine → Database checks: queries database (evidence: `app/test_case/new_unittest_case.py`)
- Test case engine → Redis state: stores results (evidence: `app/test_case/new_unittest_case.py`)
- API client → SQL database: HTTP requests (evidence: `common/api_client.py`)
- Scheduler configuration → Redis state: persists jobs (evidence: `config.py`)
- Platform user → Mock service: configures mocks (evidence: `README.md`)
- Platform user → Reports and notifications: receives reports (evidence: `README.md`)
- Platform user → JMeter generation: converts cases (evidence: `README.md`)
- JMeter generation → Remote execution: remote execution
- Platform user → User management: manages access (evidence: `README.md`)
- User management → Domain records: uses (evidence: `app/users/views.py`)
- Forms and validation → Domain records: validates fields (evidence: `app/forms.py`)
