# Multi-Level Automated Testing System Documentation ## Document Overview This testing system aims to build a complete, efficient, and well-structured quality assurance framework for the development, integration, and release of model services. It draws on the concept of the test pyramid from modern software engineering, progressively expanding testing activities from basic code logic verification to complex end-to-end (E2E) functionality, performance, accuracy, and even long-term stability validation. Through five levels (L1-L5) and common (Common) specifications, the system clarifies the testing objectives, scope, execution frequency, and required resources for different development stages (e.g., each commit, PR merge, daily build, pre-release). This ensures that models meet high standards for functionality, performance, and reliability across various deployment scenarios (online serving and offline inference).
| Level | Scope & Focus | Model Coverage Strategy | Feature Coverage Strategy | Interface Coverage Strategy | Tags | Time Cost | Test Dir | Doc | Frequency | Hardware |
|---|---|---|---|---|---|---|---|---|---|---|
| Common | Contribution Guideline & PR checklist | / | / | / | / | / | / | .github/PULL_REQUEST_TEMPLATE.md Test Style (PR Checklist) | / | / |
| CI Failure Description | / | / | / | / | / | / | CI Failures | / | / | |
| L1 (Unit & Logic) |
Unit tests for components like entrypoints, models | / | / | / | core_model and cpu |
<15min | /tests/{component_name}/test_xxx |
Chapter 1 Section 1 L1&L2: Purpose, Test Content, Directory Location, Example |
PR with ready label (also can run locally) | CPU |
| L2 (E2E across models & GPU-required UT) |
Online (basic deployment scenarios): dummy, normal inference function (output format, stream), some instance startup UT |
High-priority models + online basic scenarios + request success validation | High-priority features (using random lightweight models) | High-priority interfaces (using random lightweight models) | core_model and hardware_test(H100, L4, etc.) and omni/tts/diffusion |
Model tests: /tests/e2e/online_serving/test_{model_name}.py Feature tests: /tests/{component_name}/test_xxx Interface tests: /tests/entrypoints/test_xxx |
Chapter 1 L1&L2: Purpose, Test Content, Directory Location, Example |
PR with ready label | GPU | |
| L3 (Important Perf & Integration & Accuracy) |
Online & Offline (multiple deployment scenarios): real model, normal inference function, normal accuracy |
High/medium-priority models with real weights + online/offline key scenarios + basic accuracy validation | Medium-priority features (using random lightweight models) | Medium-priority interfaces (using random lightweight models) | advanced_model and hardware_test(H100, L4, etc.) and omni/tts/diffusion |
<30min |
Model tests: /tests/e2e/online_serving/test_{model_name}.py /tests/e2e/offline_inference/test_{model_name}.py Feature tests: /tests/{component_name}/test_xxx Interface tests: /tests/entrypoints/test_xxx |
Chapter 2 L3: Purpose, Test Content, Directory Location, Example |
PR Merged (Also run L1&L2 Tests) | GPU |
| L4 (Perf & Integration & Accuracy) |
Online: full functional scenarios + performance test + doc test + accuracy test | High-priority models: function, performance, accuracy, and doc testing Medium/low-priority models: function and doc testing |
Low-priority features (using random lightweight models) | Low-priority interfaces (using random lightweight models) | full_model and hardware_test(H100, L4, etc.) and omni/tts/diffusion |
<3 hour |
Model tests: /tests/e2e/online_serving/test_{model_name}_expansion.py Feature tests: /tests/{component_name}/test_xxx Interface tests: /tests/entrypoints/test_xxx Performance: /tests/dfx/perf/tests/test_qwen_omni.json (Omni), test_tts.json (TTS), and /tests/dfx/perf/tests/test_{diffusion_model}_vllm_omni.json (Diffusion) Doc Test: tests/example/online_serving/test_{model_name}.py tests/example/offline_inference/test_{model_name}.py Accuracy Test: /tests/e2e/accuracy/test_{model_name}.py |
Chapter 3 L4: Purpose, Test Content, Directory Location, Example |
Nightly | GPU |
| L5 (Stability & Reliability) |
Online: long-term stability test + reliability test | Long-term stability and reliability testing for high-priority models | / | Invalid-parameter validation for high-priority interfaces | slow and hardware_test(H100, L4, etc.) and omni/tts/diffusion |
Depends on reality |
Stability: /tests/dfx/stability/tests/test_qwen3_omni.json /tests/dfx/stability/tests/test_wan22.json Reliability: tests/dfx/reliability/test_reliability_{model_key}.py (e.g. test_reliability_qwen3_omni.py, test_reliability_wan22.py)
|
Chapter 4 L5: Purpose, Test Content, Directory Location, Example |
Weekly / Days before Release | GPU |
tests/dfx/reliability)