# chorus-bdd/chorus architecture

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

- Interactive diagram: https://gitdiagram.com/chorus-bdd/chorus
- Repository: https://github.com/chorus-bdd/chorus

## Overview

##### Main Components

a) Core Components:
- Parser
- Execution Engine
- Handler Manager
- Step Invoker

b) Extension Modules (arranged around core):
- Selenium Extension
- Spring Extension
- SQL Extension
- WebSockets Extension

c) Services Layer:
- Web Agent Service
- XML Service
- Mock Suite Service

##### Key Relationships

- Interpreter Core → Extension Modules (one-way dependency)
- Interpreter Core → Services Layer (one-way dependency)
- Extension Modules ↔ External Systems (bi-directional for remote testing)

##### Component Details

a) Interpreter Core:

- Interpreter Core    |

- Feature Parser       |
- Step Processor      |
- Handler Manager     |
- Context Manager     |
- Config Manager      |

b) Extension Modules:

- Extensions    |

- Selenium       |
- Spring         |
- SQL            |
- WebSockets     |

c) Services:

- Services     |

- Web Agent      |
- XML            |
- Mock Suite     |

##### Integration Points

Connections for:
- Remote Step Execution
- JMX Communication
- WebSocket Connections
- Database Connections

##### Additional Elements

Include:
- Configuration Flow
- Test Execution Flow
- Remote Communication Channels
- Handler Registration Process

##### The service integration points

Keep the abstraction level high enough to show the main architectural components while including sufficient detail to understand the system's distributed testing capabilities.

This design reflects Chorus's unique ability to handle distributed testing scenarios while maintaining a clean separation between core functionality and extensions.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Core
        IC[Interpreter Core]
        P[Parser]
        SP[Step Processor]
        HM[Handler Manager]
        SI[Step Invoker]
        CM[Configuration Manager]
        CX[Context Manager]
        
        IC --> P
        IC --> SP
        IC --> HM
        IC --> SI
        IC --> CM
        IC --> CX
    end

    subgraph Extensions
        SE[Selenium Extension]
        SPE[Spring Extension]
        SQLE[SQL Extension]
        WE[WebSockets Extension]
    end

    subgraph Services
        WAS[Web Agent Service]
        XS[XML Service]
        MSS[Mock Suite Service]
    end

    subgraph External
        DB[(Database)]
        WS[Web Services]
        RS[Remote Systems]
    end

    %% Core connections to other components
    IC --> Extensions
    IC --> Services

    %% Extension connections to external systems
    SE <--> WS
    SPE <--> RS
    SQLE <--> DB
    WE <--> RS

    %% Services connections
    WAS <--> RS
    XS <--> WS
    MSS <--> RS

    %% Style definitions
    classDef core fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef extension fill:#90EE90,stroke:#333,stroke-width:2px
    classDef service fill:#FFB347,stroke:#333,stroke-width:2px
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Apply styles
    class IC,P,SP,HM,SI,CM,CX core
    class SE,SPE,SQLE,WE extension
    class WAS,XS,MSS service
    class DB,WS,RS external

    %% Click events
    click IC "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/interpreter/interpreter/ChorusInterpreter.java"
    click P "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/parser/FeatureFileParser.java"
    click HM "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/interpreter/interpreter/HandlerManager.java"
    click SI "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/stepinvoker/StepInvoker.java"
    click SE "https://github.com/Chorus-bdd/Chorus/tree/master/extensions/chorus-selenium"
    click SPE "https://github.com/Chorus-bdd/Chorus/tree/master/extensions/chorus-spring"
    click SQLE "https://github.com/Chorus-bdd/Chorus/tree/master/extensions/chorus-sql"
    click WE "https://github.com/Chorus-bdd/Chorus/tree/master/extensions/chorus-websockets"
    click WAS "https://github.com/Chorus-bdd/Chorus/tree/master/services/chorus-webagent"
    click XS "https://github.com/Chorus-bdd/Chorus/tree/master/services/chorus-xml"
    click MSS "https://github.com/Chorus-bdd/Chorus/tree/master/services/chorus-mocksuite"
    click CM "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/handlerconfig/ConfigurationManager.java"
    click CX "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/context/ChorusContext.java"
    click SP "https://github.com/Chorus-bdd/Chorus/blob/master/interpreter/chorus/src/main/java/org/chorusbdd/chorus/interpreter/interpreter/StepProcessor.java"
```
