# yorhanpolanco/bluesoft architecture

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

- Interactive diagram: https://gitdiagram.com/yorhanpolanco/bluesoft
- Repository: https://github.com/yorhanpolanco/bluesoft

## Overview

##### Project Type & Purpose
- This is an automation testing framework, not a full-stack web application. Its primary role is to execute automated UI tests with browser interactions.
- It integrates Playwright (for browser automation), Cucumber (for behavior driven development with features and step definitions), and TypeScript (for type safety and robust scripting).

##### File Structure
- Top-Level Directories:
- .github: Contains CI pipeline definitions – represent as “CI/CD Pipeline” that triggers test runs.
- logs: Where log files are stored – mark this as a “Logging” component.
- src: The core source code of the framework. Within it:
⁃ config: Environment and logging configuration files.
⁃ data: Contains test data in JSON format, which feeds test scenarios.
⁃ pom: Holds the Page Object Models which encapsulate the logic for interacting with web pages.
⁃ test: Contains Cucumber feature files (under features) and step definitions (under steps) – these represent the test scenarios/behavior.
⁃ test-result: Repositories for test result reports and screenshots.
⁃ utilidades: Utility scripts for Playwright (helper functions, etc.).
- Standalone Files:
- .env: Environment variables defining configuration properties.
- cucumber.js, playwright.config.ts, tsconfig.json and package.json: Configuration files for testing, browser automation, TypeScript settings, and node dependencies.

##### Key System Components
a. Test Execution Engine:
- This includes Cucumber (for feature and step management) and Node.js runtime.
- Test runner which accepts parameters (via command line arguments) to select features/tags and browser types.
b. Browser Automation Layer:
c. Page Object Model (POM):
- This layer as the abstraction that handles interactions with the UI components. Each POM module (from src/pom) encapsulates page behaviors and locators.
d. Configuration & Environment Management:
- Combine the .env file along with the files in src/config which manage logging settings and the “World” class. This serves as a central configuration hub.
e. Test Data Management:
- The JSON file in src/data provides test input data. This component feeds the test scenarios managed by Cucumber.
f. Reporting and Logging:
- The logs folder (and its configurations) and the test-result directory (with reports and screenshots) are used for capturing logs and visual results of test executions.
g. CI/CD Component:
- GitHub Workflows for the pipeline. This can be depicted as an external trigger that initiates the test runs using the automation framework.

- Component is clearly labeled.

## Diagram (Mermaid)

```mermaid
graph TD
    CI["CI/CD Pipeline"]:::infra
    TEE["Test Execution Engine (Cucumber+Node.js)"]:::automation
    CM["Configuration Management"]:::config
    TD["Test Data (JSON)"]:::config
    POM["Page Object Model"]:::automation
    BA["Browser Automation (Playwright)"]:::automation
    RL["Reporting & Logs"]:::infra
    LG["Logging"]:::infra

    CI --> TEE
    CM --> TEE
    TD --> TEE
    TEE --> POM
    POM --> BA
    BA --> RL
    TEE --> RL
    TEE --> LG
    CM --> LG
    LG --> RL

    click CI "https://github.com/yorhanpolanco/bluesoft/blob/main/.github/workflows/gitHubPipeline.yml"
    click LG "https://github.com/yorhanpolanco/bluesoft/tree/main/logs"
    click LG "https://github.com/yorhanpolanco/bluesoft/blob/main/src/config/logConfig.js"
    click CM "https://github.com/yorhanpolanco/bluesoft/blob/main/.env"
    click CM "https://github.com/yorhanpolanco/bluesoft/blob/main/src/config/world.ts"
    click TD "https://github.com/yorhanpolanco/bluesoft/blob/main/src/data/computerDataBase.json"
    click POM "https://github.com/yorhanpolanco/bluesoft/blob/main/src/pom/computerDataBasePOM.ts"
    click TEE "https://github.com/yorhanpolanco/bluesoft/blob/main/cucumber.js"
    click TEE "https://github.com/yorhanpolanco/bluesoft/tree/main/src/test/features"
    click TEE "https://github.com/yorhanpolanco/bluesoft/tree/main/src/test/steps"
    click BA "https://github.com/yorhanpolanco/bluesoft/blob/main/playwright.config.ts"
    click BA "https://github.com/yorhanpolanco/bluesoft/blob/main/src/utilidades/playwright-utilidades.ts"
    click RL "https://github.com/yorhanpolanco/bluesoft/tree/main/src/test-result"

    classDef automation fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
    classDef config fill:#A9DFBF,stroke:#27AE60,stroke-width:2px;
    classDef infra fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
```
