# anhhao1996/karate-sikulix-demo architecture

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

- Interactive diagram: https://gitdiagram.com/anhhao1996/karate-sikulix-demo
- Repository: https://github.com/anhhao1996/karate-sikulix-demo

## Overview

##### Main Components

a) Core Testing Components:
- Karate Test Runner (Central Component)
- SikuliX Visual Testing Engine
- WinAppDriver Integration
- Browser Automation Module
- GraphQL Testing Module
- Mock Server Component

b) Test Execution Components:
- Feature File Executor
- UI Debugger/Step-through Component
- Report Generator

**[Feature Files (.feature)] --> [Common Test Resources]**

**[Karate Test Runner]**

- > [SikuliX Engine]

- > [WinAppDriver Bridge]

- > [Browser Automation]

- > [Mock Server]

**[Desktop Apps] [Web Browsers] [GraphQL APIs] [Mock Services]**

##### Key Relationships

- Bold lines for primary execution paths

##### Technical Details

- Java Runtime Environment requirement (v1.8.0_112+)
- Standalone JAR execution capability
- Port configurations for mock servers
- File system interactions for HTML reports

##### Integration Points

Clear connections for:
- VS Code extension integration
- Browser automation capabilities
- Mock API server interfaces
- Desktop application interaction points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Test_Definition_Layer
        FeatFiles["Feature Files"]:::testdef
        CommonRes["Common Test Resources"]:::testdef
    end

    subgraph Execution_Engine
        KarateRunner["Karate Test Runner"]:::core
        SikuliX["SikuliX Visual Testing"]:::integration
        WinApp["WinAppDriver Bridge"]:::integration
        BrowserAuto["Browser Automation"]:::integration
        MockServer["Mock Server"]:::mock
        GraphQL["GraphQL Testing"]:::integration
    end

    subgraph Target_Systems
        Desktop["Desktop Applications"]:::target
        Browsers["Web Browsers"]:::target
        APIs["GraphQL APIs"]:::target
        MockServices["Mock Services"]:::target
    end

    subgraph Test_Execution_Modes
        Standard["Standard Mode"]:::mode
        UIDebug["UI Debug Mode (-u)"]:::mode
        MockMode["Mock Mode (-m)"]:::mode
    end

    subgraph Reporting_Flow
        Execution["Test Execution"]:::report
        Results["Results Collection"]:::report
        HTMLReport["HTML Reports"]:::report
    end

    %% Connections
    FeatFiles <--> KarateRunner
    CommonRes --> KarateRunner
    KarateRunner --> SikuliX
    KarateRunner --> WinApp
    KarateRunner --> BrowserAuto
    KarateRunner --> MockServer
    KarateRunner --> GraphQL

    SikuliX --> Desktop
    WinApp --> Desktop
    BrowserAuto --> Browsers
    GraphQL --> APIs
    MockServer -.-> MockServices

    KarateRunner --> Standard
    KarateRunner --> UIDebug
    KarateRunner --> MockMode

    KarateRunner --> Execution
    Execution --> Results
    Results --> HTMLReport

    %% Click Events
    click CommonRes "https://github.com/anhhao1996/karate-sikulix-demo/blob/master/common.feature"
    click GraphQL "https://github.com/anhhao1996/karate-sikulix-demo/blob/master/by-name.graphql"
    click MockServer "https://github.com/anhhao1996/karate-sikulix-demo/blob/master/cats-mock.feature"
    click BrowserAuto "https://github.com/anhhao1996/karate-sikulix-demo/blob/master/web-mac.feature"
    click KarateRunner "https://github.com/anhhao1996/karate-sikulix-demo/tree/master/karate"
    click SikuliX "https://github.com/anhhao1996/karate-sikulix-demo/tree/master/images/"
    click Desktop "https://github.com/anhhao1996/karate-sikulix-demo/blob/master/calc.feature"

    %% Styles
    classDef testdef fill:#90EE90,stroke:#333,stroke-width:2px
    classDef core fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef integration fill:#FFA500,stroke:#333,stroke-width:2px
    classDef target fill:#808080,stroke:#333,stroke-width:2px
    classDef mock fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef mode fill:#FFE4B5,stroke:#333,stroke-width:2px
    classDef report fill:#B0C4DE,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["Test Definition"]:::testdef
        L2["Core Components"]:::core
        L3["Integration Components"]:::integration
        L4["Target Systems"]:::target
        L5["Mock Components"]:::mock
        L6["Execution Modes"]:::mode
        L7["Reporting"]:::report
    end
```
