About the Project
This project provides a Go CLI tool designed for automated UI testing of browsers and native desktop applications. It features a pluggable architecture, allowing for easy integration of new automation backends without modifying the core logic. Key functionalities include automatic screenshot capture and the generation of Allure reports for detailed test results.
Key Features
- Pluggable Architecture: Easily extendable with new automation tools (drivers) by implementing the domain.ToolConnector interface.
- Browser Testing: Supports direct control of Chrome/Chromium via the DevTools Protocol using the chromedp library.
- Desktop Application Testing: Integrates with standard W3C WebDriver wire protocol implementations like Selenium Grid, Appium (for Android/iOS), WinAppDriver (for Windows), and Appium-Mac2Driver (for macOS).
- Local Desktop Automation: Includes an example implementation using go-vgo/robotgo for direct local desktop control, though it requires CGO and platform-specific libraries.
- Scenario-Based Testing: Tests are defined in JSON files, specifying the tool, base URL, and a sequence of steps.
- Supported Step Types: Includes actions like navigate, click, input, wait_for, assert_text, assert_exist, screenshot, and sleep.
- Fail-Fast Execution: The runner stops immediately upon the first failed step to prevent cascading errors.
- Sensitive Data Masking: Supports masking of sensitive input values in reports for enhanced security.
- Automatic Screenshots: Captures screenshots for every step by default, with options to disable or customize the directory.
- Allure Report Generation: Outputs test results in a format compatible with Allure reports, including steps, parameters, and attachments.
- Standardized Exit Codes: Uses 0 for success, 1 for failure/error, and 2 for CLI usage errors, suitable for CI integration.
- Minimal Dependencies: Primarily relies on the Go standard library, with only chromedp as a key external dependency for browser testing.
Getting Started
Build the CLI using go build ./cmd/uitester. Execute tests by specifying a configuration file and a scenario file, e.g., ./uitester -config configs/config.example.json -scenario scenarios/example_login.json. For more advanced configurations or to list available tools, refer to the project documentation.