How automationsolutionz/zeuz_python_node works
Project Type and Purpose
• This is a Python-based, client-side automation engine (Zeuz Node) that runs test cases delivered by a remote Deploy Service.
• It exposes a CLI (node_cli.py) and can run as a daemon (daemon.sh).
File Structure
• Top level:
• node_cli.py, settings.py, pyproject.toml, Framework/, Drivers/, Apps/, server/, reporting/, tests/
• Framework layer (Framework/):
• deploy_handler/ (connect & long-poll adapter)
• MainDriverApi.py (entry to test execution)
• Built_In_Automation/ plugins (Desktop, Mobile, Web, Performance, Security, etc.)
• edge_module/ (Edge/Selenium integration)
• easyocr/ (OCR module)
• Utilities/ for config, logging, file I/O, etc.
• Drivers (Drivers/): abstractions for OS-level automation hooks.
• Apps (Apps/): pre-built binaries and scripts for various platforms (Windows, Mac, Mobile, Web).
• Reporting (reporting/): JUnit and HTML report generators.
• Server folder (server/): local test/development server utilities (not part of production node).
README
• Explains core flows, flags, and target Python version.
a. Main Components (blocks)
1. Client CLI Layer
• node_cli.py (Entry point)
2. Deploy Handler / Network Layer
• Framework/deploy_handler/adapter.py
• long_poll_handler.py
• External Zeuz Deploy Service (REST/gRPC)
3. Test-Case Adapter & Persistence
• ProtoAdapter → save_json → local JSON file
4. Core Execution Engine
• MainDriverApi.py
5. Plugin/Automation Modules
• Built_In_Automation (Desktop, Mobile, Web, Performance, Security, Sequential Actions)
• edge_module (Edge/Selenium)
• easyocr (OCR)
6. Drivers & External Tools
• Drivers/ Python wrappers
• Binaries and scripts under Apps/
7. Reporting & Artifacts
• reporting/junit_report.py
• Artifacts uploader (screenshots, logs)
8. Configuration & Utilities
• Framework/Utilities/ConfigModule.py, logging, decorators
9. (Optional) Local Dev Server
• server/ folder—excluded from production flow
b. Relationships and Data Flow
• CLI invokes Deploy Handler → establishes connection to Zeuz Deploy Service
• Server pushes test-case payloads → Deploy Handler callbacks → ProtoAdapter → persisted JSON
• MainDriverApi reads JSON → hands off to plugin modules (Built_In_Automation, edge_module, easyocr)
• Plugin modules call Drivers and external executables in Apps/
• Execution results and artifacts flow back to Reporter and Artifacts Uploader → Deploy Service
c. Architectural Patterns & Principles
• Layered Architecture: CLI → Network → Adapter → Core → Plugins → Drivers
• Plugin/Strategy Pattern: each Built_In_Automation submodule implements a common interface
• State Machine: the node’s lifecycle (connect → receive → execute → report → reconnect)
• Separation of Concerns: networking, parsing, execution, and reporting are distinct layers
d. Key Technologies & Frameworks
• Python 3.8
• HTTP/REST or gRPC for service communication
• Selenium / Appium (via edge_module & Built_In_Automation modules)
• easyOCR for OCR tasks
• Locust for performance testing