# jardevson/appiumrobot architecture

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

- Interactive diagram: https://gitdiagram.com/jardevson/appiumrobot
- Repository: https://github.com/jardevson/appiumrobot

## Overview

##### Project type and purpose
- This is a mobile test‑automation framework using Robot Framework and Appium.
- The README title “AppiumRobot” and presence of an APK under resources/app/app.apk confirm it’s built to drive automated UI tests against an Android application.
- The CI workflows reference BrowserStack and a generic CI pipeline, indicating automated cross‑device test execution.

##### File structure
- Top‑level files:
- .env.example – environment variables for credentials, endpoints, BrowserStack keys, etc.
- requirements.txt – Python dependencies (Appium‑Python‑Client, Robot Framework, etc.)
- base.resource – shared Robot resource (likely global variables or settings).
- resources/ directory:
- app/ – contains the mobile .apk under test.
- libs/ – Python or Robot keyword libraries (e.g., DotEnv.py for loading environment variables).
- locators/ – YAML files defining element locator maps for each screen (homeLocators.yaml, signInLocator.yaml, etc.).
- pages/ – Robot resource files representing page‑object definitions (homePage.resource, searchPage.resource, etc.).
- utils/ – generic Robot resource files for common operations (customKeywords.resource, openApp.resource).
- tests/ – Robot test suites (.robot files) that implement test cases, each importing resources and calling keywords.
- .github/workflows/ – CI pipelines for local CI runs and BrowserStack integration (ci.yml, browserstack.yml).

##### README for additional insights
- README is minimal but the project name confirms Appium + Robot Framework.

##### Elements
– Tests → Resources → Appium → Devices
– CI Server → triggers Test Runner
– Test Runner → loads .env → libs
– CI Server → BrowserStack → Devices
– Blue for Robot Framework artifacts (tests, resources)
– Green for infrastructure (Appium, devices, BrowserStack)
– Orange for config/data (APK, YAML, .env)

##### Detail
- CI workflows launching either local Appium or BrowserStack sessions.
- Both normal test execution and CI‑driven runs.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% CI Layer
    subgraph "CI/CD Layer"
        direction TB
        CIlocal["Local CI Pipeline"]:::infra
        CIbs["BrowserStack CI Pipeline"]:::infra
    end

    %% Test Runner Layer
    subgraph "Test Runner Layer"
        direction TB
        testsFolder["tests/"]:::robot
        subgraph "Test Suites"
            direction TB
            Acessar["Acessar-App.robot"]:::robot
            Pesquisar["Pesquisar-Video.robot"]:::robot
            Surpreenda["Surpreenda-me.robot"]:::robot
        end
    end

    %% Config Layer
    Env[".env.example"]:::config

    %% Resource Layer
    subgraph "Resource Layer"
        direction TB
        Base["base.resource"]:::robot

        subgraph "Pages"
            direction TB
            homePage["homePage.resource"]:::robot
            interestPage["interestPage.resource"]:::robot
            lookingForPage["lookingForPage.resource"]:::robot
            resultSearchPage["resultSearchPage.resource"]:::robot
            searchPage["searchPage.resource"]:::robot
            signInPage["signInPage.resource"]:::robot
            welcomePage["welcomePage.resource"]:::robot
        end

        subgraph "Locators"
            direction TB
            homeLocators["homeLocators.yaml"]:::config
            interestLocators["interestLocators.yaml"]:::config
            lookingForLocators["lookingForLocators.yaml"]:::config
            resultSearchLocators["resultSearch.yaml"]:::config
            searchLocators["searchLocators.yaml"]:::config
            signInLocators["signInLocator.yaml"]:::config
            welcomeLocators["welcomeLocators.yaml"]:::config
        end

        subgraph "Utils"
            direction TB
            customKeywords["customKeywords.resource"]:::robot
            openApp["openApp.resource"]:::robot
        end

        subgraph "Python Libs"
            direction TB
            DotEnvLib["DotEnv.py"]:::robot
        end
    end

    %% Execution Layer
    subgraph "Execution Layer"
        direction TB
        Appium["Appium Server"]:::infra
        subgraph "Devices"
            direction TB
            LocalDevice["Local/Emulator Device"]:::infra
            BrowserStackDevice["BrowserStack Device"]:::infra
        end
        APK["app.apk"]:::config
    end

    %% Relationships
    CIlocal -->|"triggers"| testsFolder
    CIbs -->|"triggers"| testsFolder
    testsFolder -->|executes| Acessar
    testsFolder -->|executes| Pesquisar
    testsFolder -->|executes| Surpreenda

    Acessar -->|imports| Base
    Acessar -->|imports| homePage
    Acessar -->|imports| homeLocators
    Pesquisar -->|imports| searchPage
    Pesquisar -->|imports| searchLocators
    Surpreenda -->|imports| interestPage
    Surpreenda -->|imports| interestLocators

    Acessar -->|uses keyword| customKeywords
    Pesquisar -->|uses keyword| openApp

    Acessar -->|loads env| DotEnvLib
    DotEnvLib -->|reads| Env

    homePage -->|uses locators| homeLocators
    searchPage -->|uses locators| searchLocators
    interestPage -->|uses locators| interestLocators

    testsFolder -->|sends commands| Appium
    Appium -->|deploys APK| LocalDevice
    Appium -->|deploys APK| BrowserStackDevice
    APK -->|binary under test| Appium

    CIbs -->|connects| BrowserStackDevice

    %% Click Events
    click testsFolder "https://github.com/jardevson/appiumrobot/tree/main/tests/"
    click Acessar "https://github.com/jardevson/appiumrobot/blob/main/tests/Acessar-App.robot"
    click Pesquisar "https://github.com/jardevson/appiumrobot/blob/main/tests/Pesquisar-Video.robot"
    click Surpreenda "https://github.com/jardevson/appiumrobot/blob/main/tests/Surpreenda-me.robot"
    click Base "https://github.com/jardevson/appiumrobot/blob/main/base.resource"
    click homePage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/homePage.resource"
    click interestPage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/interestPage.resource"
    click lookingForPage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/lookingForPage.resource"
    click resultSearchPage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/resultSearchPage.resource"
    click searchPage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/searchPage.resource"
    click signInPage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/signInPage.resource"
    click welcomePage "https://github.com/jardevson/appiumrobot/blob/main/resources/pages/welcomePage.resource"
    click homeLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/homeLocators.yaml"
    click interestLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/interestLocators.yaml"
    click lookingForLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/lookingForLocators.yaml"
    click resultSearchLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/resultSearch.yaml"
    click searchLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/searchLocators.yaml"
    click signInLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/signInLocator.yaml"
    click welcomeLocators "https://github.com/jardevson/appiumrobot/blob/main/resources/locators/welcomeLocators.yaml"
    click customKeywords "https://github.com/jardevson/appiumrobot/blob/main/resources/utils/customKeywords.resource"
    click openApp "https://github.com/jardevson/appiumrobot/blob/main/resources/utils/openApp.resource"
    click DotEnvLib "https://github.com/jardevson/appiumrobot/blob/main/resources/libs/DotEnv.py"
    click APK "https://github.com/jardevson/appiumrobot/blob/main/resources/app/app.apk"
    click CIlocal "https://github.com/jardevson/appiumrobot/blob/main/.github/workflows/ci.yml"
    click CIbs "https://github.com/jardevson/appiumrobot/blob/main/.github/workflows/browserstack.yml"
    click Env "https://github.com/jardevson/appiumrobot/blob/main/.env.example"

    %% Styles
    classDef robot fill:#D0E1F9,stroke:#333,stroke-width:1px
    classDef infra fill:#ABEBC6,stroke:#333,stroke-width:1px
    classDef config fill:#F9E79F,stroke:#333,stroke-width:1px
```
