Skip to content

Latest commit

 

History

History
89 lines (58 loc) · 7.87 KB

File metadata and controls

89 lines (58 loc) · 7.87 KB
graph LR
    Pytest_Plugin_Integration["Pytest Plugin Integration"]
    Xdist_Coordinator_Master_Process_["Xdist Coordinator (Master Process)"]
    Xdist_Worker_Slave_Process_["Xdist Worker (Slave Process)"]
    Test_Item_Scheduler["Test Item Scheduler"]
    Inter_Process_Communication_IPC_Layer["Inter-Process Communication (IPC) Layer"]
    Pytest_Plugin_Integration -- "Initializes Distributed Session" --> Xdist_Coordinator_Master_Process_
    Xdist_Coordinator_Master_Process_ -- "Spawns & Manages Workers" --> Xdist_Worker_Slave_Process_
    Xdist_Coordinator_Master_Process_ -- "Requests Test Distribution Strategy" --> Test_Item_Scheduler
    Test_Item_Scheduler -- "Provides Test Item Batches" --> Xdist_Coordinator_Master_Process_
    Xdist_Coordinator_Master_Process_ -- "Sends Commands / Receives Events" --> Inter_Process_Communication_IPC_Layer
    Inter_Process_Communication_IPC_Layer -- "Receives Tests / Sends Results" --> Xdist_Worker_Slave_Process_
    click Pytest_Plugin_Integration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pytest-xdist/Pytest_Plugin_Integration.md" "Details"
    click Xdist_Coordinator_Master_Process_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pytest-xdist/Xdist_Coordinator_Master_Process_.md" "Details"
    click Xdist_Worker_Slave_Process_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pytest-xdist/Xdist_Worker_Slave_Process_.md" "Details"
    click Inter_Process_Communication_IPC_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pytest-xdist/Inter_Process_Communication_IPC_Layer.md" "Details"
Loading

CodeBoardingDemoContact

Details

pytest-xdist extends pytest to enable distributed test execution. The architecture centers around a Pytest Plugin Integration that initializes a Xdist Coordinator (Master Process). This Coordinator manages multiple Xdist Worker (Slave Process) instances, distributing test items via a Test Item Scheduler and communicating through a robust Inter-Process Communication (IPC) Layer. This design ensures efficient parallel test execution and centralized result aggregation, optimizing for both performance and maintainability.

Pytest Plugin Integration [Expand]

The initial interface that hooks pytest-xdist into the core pytest framework. It handles command-line argument parsing, session configuration, and the initiation of the distributed test run.

Related Classes/Methods:

Xdist Coordinator (Master Process) [Expand]

The central orchestrator of the distributed test session. It manages worker lifecycles, distributes test items, and aggregates all results and events from the workers.

Related Classes/Methods:

Xdist Worker (Slave Process) [Expand]

An independent process responsible for executing a subset of test items assigned by the Coordinator and reporting its results.

Related Classes/Methods:

Test Item Scheduler

A specialized sub-component within the Coordinator's domain that implements various strategies for efficiently distributing test items among worker nodes.

Related Classes/Methods:

Inter-Process Communication (IPC) Layer [Expand]

The abstract communication channel facilitating data exchange (commands, test items, results, events) between the Coordinator and Worker processes.

Related Classes/Methods: