Skip to content

Orchestrix is the matrix that orchestrates your device testing and brings perfect synchronization to parallel test automation.

License

Notifications You must be signed in to change notification settings

ConvergentThinker/orchestrix

Repository files navigation

πŸš€ Orchestrix - Enterprise Parallel Appium Framework

Java Maven Appium License Contributions Welcome

An FPGA-inspired enterprise-grade parallel mobile test automation framework

Website β€’ Documentation β€’ Examples β€’ Report Bug β€’ Request Feature


πŸ“– Table of Contents


🎯 Overview

Orchestrix is a production-ready, enterprise-grade parallel mobile test automation framework built on Appium. It solves the most common pain points in parallel mobile testing by providing automatic port management, device pooling, thread-safe execution, and beautiful reporting.

What Makes Orchestrix Special?

  • πŸ—οΈ FPGA-Inspired Architecture: Applies hardware parallelism concepts to software testing
  • ⚑ 3-10x Faster Execution: True parallel test execution across multiple devices
  • πŸ”’ 100% Thread-Safe: Production-ready concurrent execution with zero conflicts
  • πŸ“Š Beautiful Reports: Feature-grouped HTML reports with device-wise analytics
  • 🎯 Zero Configuration: Automatic port allocation and device management
  • ☁️ Cloud Ready: Built-in support for LambdaTest, BrowserStack, and more

πŸ’‘ Why Orchestrix?

The Problem

Traditional Appium parallel testing faces several challenges:

  • ❌ Port conflicts when running multiple tests
  • ❌ Manual device management and allocation
  • ❌ Thread safety issues causing test failures
  • ❌ Complex setup and configuration
  • ❌ Limited reporting capabilities

The Solution

Orchestrix provides:

  • βœ… Automatic port allocation (no conflicts)
  • βœ… Intelligent device pooling with tier-based allocation
  • βœ… Thread-safe execution using proven design patterns
  • βœ… Simple JSON-based configuration
  • βœ… Comprehensive reporting with feature grouping

✨ Key Features

Core Capabilities

Feature Description
πŸš€ Parallel Execution Run tests simultaneously across multiple devices with automatic resource management
πŸ”Œ Zero Port Conflicts Automatic port allocation prevents conflicts in parallel execution
πŸ”’ Perfect Isolation ThreadLocal pattern ensures complete test isolation
πŸ”„ Smart Retry Logic Auto-retry transient failures with exponential backoff
πŸ’Ύ Result Caching Skip unchanged tests to save 30-70% execution time
πŸ“Š Device-Wise Reports Beautiful HTML reports with feature grouping and device breakdown
πŸ“± Page Object Model Maintainable, reusable test code structure
πŸ”— CI/CD Ready Jenkins & GitHub Actions integration included
☁️ Cloud Support LambdaTest, BrowserStack, and custom cloud providers

Advanced Features

  • Tier-Based Device Allocation: Premium, Standard, Basic device tiers with automatic fallback
  • Feature Grouping: Organize tests by feature files in reports
  • Screenshot Management: Automatic screenshots on failure, stored with reports
  • BDD Support: Full Cucumber integration for behavior-driven testing
  • Extensible Architecture: Easy to add custom cloud providers and extensions

πŸš€ Quick Start

Prerequisites

  • Java 17 or higher
  • Maven 3.6 or higher
  • Node.js 18+ and npm
  • Appium 2.x
  • Android SDK (for Android testing)
  • Xcode (for iOS testing - macOS only)

5-Minute Setup

# 1. Clone the repository
git clone https://github.com/your-username/orchestrix.git
cd orchestrix

# 2. Build the project
mvn clean install

# 3. Configure devices
cp config/devices.json.example config/devices.json
# Edit config/devices.json with your device configurations

# 4. Start Appium servers
./scripts/start-appium-nodes.sh

# 5. Run your first test
mvn clean test

# 6. View reports
open reports/extent/TestReport-*/Report.html

That's it! You're ready to start testing. πŸŽ‰


πŸ“¦ Installation

Step 1: Install Prerequisites

Java 17+

macOS (Homebrew):

brew install openjdk@17

Windows: Download from Oracle JDK or OpenJDK

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install openjdk-17-jdk

Maven 3.6+

macOS (Homebrew):

brew install maven

Windows/Linux: Download from Maven Download

Appium 2.x

npm install -g appium@latest
appium driver install uiautomator2  # For Android
appium driver install xcuitest       # For iOS (macOS only)

Step 2: Clone and Build

git clone https://github.com/your-username/orchestrix.git
cd orchestrix
mvn clean install

Step 3: Configure Devices

Edit config/devices.json:

[
  {
    "deviceName": "Pixel_7_Emulator",
    "udid": "emulator-5554",
    "platformName": "Android",
    "platformVersion": "13",
    "tier": "premium",
    "appiumPort": 4723,
    "systemPort": 8200,
    "chromedriverPort": 9515,
    "app": "/path/to/your/app.apk"
  }
]

For detailed configuration, see Device Configuration Guide

Step 4: Verify Installation

# Check Java
java -version

# Check Maven
mvn -version

# Check Appium
appium --version

# Verify project builds
mvn clean compile

πŸŽ“ Getting Started

Your First Test

Create a test class:

package com.parallel.appium.tests.login;

import com.parallel.appium.tests.base.BaseTest;
import com.parallel.appium.pages.login.LoginPage;
import com.parallel.appium.pages.home.HomePage;
import org.testng.Assert;
import org.testng.annotations.Test;

public class LoginTests extends BaseTest {
    
    @Test(description = "TC001: Verify successful login")
    public void testValidLogin() {
        // Navigate to login page
        LoginPage loginPage = new LoginPage();
        
        // Perform login
        HomePage homePage = loginPage.login("user@example.com", "password123");
        
        // Verify success
        Assert.assertTrue(homePage.isPageLoaded(), 
            "Home page should be loaded after login");
    }
}

Running Tests

# Run all tests
mvn clean test

# Run specific test class
mvn clean test -Dtest=LoginTests

# Run with custom thread count
mvn clean test -Dparallel.threads=4

# Run specific device tier
mvn clean test -Ddevice.tier=premium

# Run Cucumber BDD tests
mvn clean test -Pcucumber

Viewing Reports

After test execution, reports are generated in:

reports/
  β”œβ”€β”€ consolidated/
  β”‚   └── Device_summary<timestamp>.html
  └── extent/
      └── TestReport-<timestamp>/
          β”œβ”€β”€ Report.html
          └── screenshots/

Open reports:

# macOS
open reports/extent/TestReport-*/Report.html

# Windows
start reports\extent\TestReport-*\Report.html

# Linux
xdg-open reports/extent/TestReport-*/Report.html

πŸ“ Project Structure

orchestrix/
β”œβ”€β”€ config/                          # Configuration files
β”‚   β”œβ”€β”€ devices.json                 # Device configurations
β”‚   β”œβ”€β”€ devices.json.example         # Example device config
β”‚   β”œβ”€β”€ retry-config.json            # Retry policy configuration
β”‚   └── README.md                    # Device configuration guide
β”‚
β”œβ”€β”€ scripts/                         # Utility scripts
β”‚   β”œβ”€β”€ start-appium-nodes.sh        # Start Appium servers
β”‚   β”œβ”€β”€ stop-appium-nodes.sh         # Stop Appium servers
β”‚   β”œβ”€β”€ run-tests.sh                 # Test runner script
β”‚   └── setup-environment.sh         # Environment setup
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/java/com/parallel/appium/
β”‚   β”‚   β”œβ”€β”€ core/                    # Core framework components
β”‚   β”‚   β”‚   β”œβ”€β”€ DevicePool.java      # Device allocation manager
β”‚   β”‚   β”‚   β”œβ”€β”€ DriverFactory.java   # ThreadLocal driver management
β”‚   β”‚   β”‚   β”œβ”€β”€ PortManager.java     # Port allocation
β”‚   β”‚   β”‚   └── TestContext.java     # Test context management
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ config/                  # Configuration classes
β”‚   β”‚   β”‚   β”œβ”€β”€ DeviceConfig.java    # Device configuration model
β”‚   β”‚   β”‚   └── ConfigReader.java    # Configuration reader
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ pages/                   # Page Object Model
β”‚   β”‚   β”‚   β”œβ”€β”€ base/BasePage.java   # Base page class
β”‚   β”‚   β”‚   β”œβ”€β”€ login/LoginPage.java
β”‚   β”‚   β”‚   └── home/HomePage.java
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ reporting/               # Reporting components
β”‚   β”‚   β”‚   β”œβ”€β”€ ExtentReportManager.java
β”‚   β”‚   β”‚   β”œβ”€β”€ ConsolidatedReportBuilder.java
β”‚   β”‚   β”‚   └── DeviceStatsManager.java
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ cloud/                   # Cloud provider support
β”‚   β”‚   β”‚   β”œβ”€β”€ CloudProvider.java
β”‚   β”‚   β”‚   β”œβ”€β”€ LambdaTestProvider.java
β”‚   β”‚   β”‚   └── BrowserStackProvider.java
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ retry/                   # Retry logic
β”‚   β”‚   β”‚   └── RetryAnalyzer.java
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ cache/                   # Result caching
β”‚   β”‚   β”‚   └── TestResultCache.java
β”‚   β”‚   β”‚
β”‚   β”‚   └── utils/                   # Utility classes
β”‚   β”‚       β”œβ”€β”€ WaitHelper.java
β”‚   β”‚       β”œβ”€β”€ ScreenshotUtils.java
β”‚   β”‚       └── GestureHelper.java
β”‚   β”‚
β”‚   └── test/java/com/parallel/appium/
β”‚       β”œβ”€β”€ tests/                   # Test classes
β”‚       β”‚   β”œβ”€β”€ base/BaseTest.java   # Base test class
β”‚       β”‚   β”œβ”€β”€ login/LoginTests.java
β”‚       β”‚   └── product/ProductTests.java
β”‚       β”‚
β”‚       β”œβ”€β”€ runners/                 # Test runners
β”‚       β”‚   └── CucumberTestRunner.java
β”‚       β”‚
β”‚       β”œβ”€β”€ stepdefinitions/         # Cucumber step definitions
β”‚       β”‚   β”œβ”€β”€ LoginStepDefinitions.java
β”‚       β”‚   └── ProductStepDefinitions.java
β”‚       β”‚
β”‚       └── resources/
β”‚           β”œβ”€β”€ features/            # Cucumber feature files
β”‚           β”‚   β”œβ”€β”€ login.feature
β”‚           β”‚   └── product.feature
β”‚           └── cucumber.properties
β”‚
β”œβ”€β”€ reports/                         # Generated reports (gitignored)
β”œβ”€β”€ logs/                            # Execution logs (gitignored)
β”‚
β”œβ”€β”€ .github/workflows/               # GitHub Actions workflows
β”‚   └── appium-tests.yml
β”‚
β”œβ”€β”€ Jenkinsfile                      # Jenkins pipeline
β”œβ”€β”€ pom.xml                          # Maven configuration
β”œβ”€β”€ testng.xml                       # TestNG configuration
β”œβ”€β”€ testng-cucumber.xml              # Cucumber TestNG config
β”‚
└── Documentation/
    β”œβ”€β”€ README.md                    # This file
    β”œβ”€β”€ SETUP_GUIDE.md               # Complete setup instructions
    β”œβ”€β”€ USAGE_GUIDE.md               # How to write tests
    β”œβ”€β”€ TECHNICAL_GUIDE.md           # Architecture deep dive
    β”œβ”€β”€ REAL_WORLD_USE_CASES.md      # Practical examples
    └── DOCUMENTATION_INDEX.md       # Documentation navigation

πŸ’» Examples

Example 1: Simple Login Test

public class LoginTests extends BaseTest {
    
    @Test(description = "TC001: Verify successful login")
    public void testValidLogin() {
        LoginPage loginPage = new LoginPage();
        HomePage homePage = loginPage.login("user@example.com", "password");
        
        Assert.assertTrue(homePage.isPageLoaded());
    }
}

Example 2: Cucumber BDD Test

Feature File (login.feature):

@login @smoke @TC001
Feature: User Login
  As a user
  I want to login to the application
  So that I can access my account

  Scenario: Successful login with valid credentials
    Given I am on the login page
    When I login with username "user@example.com" and password "password"
    Then I should be logged in successfully
    And I should see the welcome message

Step Definitions:

@Given("I am on the login page")
public void iAmOnTheLoginPage() {
    loginPage = new LoginPage();
    Assert.assertTrue(loginPage.isPageLoaded());
}

@When("I login with username {string} and password {string}")
public void iLoginWithUsernameAndPassword(String username, String password) {
    homePage = loginPage.login(username, password);
}

@Then("I should be logged in successfully")
public void iShouldBeLoggedInSuccessfully() {
    Assert.assertTrue(homePage.isPageLoaded());
}

Example 3: E-Commerce Shopping Flow

@Test(description = "Complete shopping journey")
public void testCompleteShoppingJourney() {
    // Login
    LoginPage loginPage = new LoginPage();
    HomePage homePage = loginPage.login("customer@shop.com", "password");
    
    // Browse products
    ProductPage productPage = homePage.navigateToProducts();
    productPage.searchProduct("laptop");
    
    // Add to cart
    productPage.selectProduct("MacBook Pro");
    productPage.addToCart();
    
    // Checkout
    CartPage cartPage = productPage.viewCart();
    CheckoutPage checkout = cartPage.proceedToCheckout();
    checkout.enterShippingAddress("123 Main St", "City", "12345");
    checkout.placeOrder();
    
    // Verify order
    OrderConfirmationPage confirmation = checkout.getConfirmation();
    Assert.assertTrue(confirmation.isOrderConfirmed());
}

For more examples, see Real-World Use Cases


πŸ“š Documentation

Complete Documentation Suite

Orchestrix comes with comprehensive documentation for all skill levels:

For Beginners

  • πŸ“– Setup Guide - Complete step-by-step installation and configuration
  • πŸ“ Usage Guide - Learn how to write tests with detailed examples
  • 🌍 Real-World Use Cases - 15+ practical examples for different app types

For Advanced Users

Quick References

Documentation Navigation

New to the framework? Start here:

  1. Read Setup Guide for installation
  2. Follow Usage Guide for writing tests
  3. Explore Real-World Use Cases for examples

Want to understand the architecture?

  1. Read Technical Guide
  2. Review Framework Summary

Need help? Check Documentation Index for quick navigation.


🀝 Contributing

We welcome contributions! Here's how you can help:

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass (mvn clean test)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Contribution Guidelines

  • Follow Java coding conventions
  • Write meaningful commit messages
  • Add documentation for new features
  • Include tests for new functionality
  • Update CHANGELOG.md for significant changes

Areas for Contribution

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“š Documentation improvements
  • πŸ§ͺ Test coverage
  • 🌍 Cloud provider integrations
  • 🎨 UI/UX improvements for reports

See CONTRIBUTING.md for detailed guidelines.


πŸ†˜ Support

Getting Help

Common Issues

Issue Solution
Port conflicts Use ./scripts/stop-appium-nodes.sh to clean up
Device not found Verify device UDID in config/devices.json
Tests hang Check thread count matches available devices
Screenshots not loading Ensure screenshots are in same folder as HTML
Build fails Run mvn clean install -U to update dependencies

For more troubleshooting, see Setup Guide - Troubleshooting


πŸ† Features in Detail

Parallel Execution

Run tests simultaneously across multiple devices:

# Run 4 tests in parallel
mvn clean test -Dparallel.threads=4

Device Tier Management

Organize devices by tier with automatic fallback:

{
  "tier": "premium",  // premium β†’ standard β†’ basic (automatic fallback)
  "deviceName": "iPhone 15 Pro"
}

Feature Grouping in Reports

Tests are automatically grouped by feature files:

Feature: Login
  β”œβ”€β”€ Scenario 1 [Device 1]
  └── Scenario 2 [Device 2]
Feature: Product
  └── Scenario 1 [Device 1]

Cloud Provider Support

Test on cloud devices with minimal configuration:

{
  "executionType": "lambdatest",
  "cloudProvider": "lambdatest",
  "tunnelId": "your-tunnel-id"
}

πŸ“Š Reporting

ExtentReports

  • Feature-grouped test results
  • Device-wise breakdown
  • Screenshots on failure
  • Thread-safe parallel execution
  • Beautiful HTML reports

Consolidated Reports

  • Device utilization statistics
  • Pass/fail rates per device
  • Performance metrics
  • Historical trends

Report Structure:

reports/
  β”œβ”€β”€ consolidated/
  β”‚   └── Device_summary<timestamp>.html
  └── extent/
      └── TestReport-<timestamp>/
          β”œβ”€β”€ Report.html
          └── screenshots/

πŸ”„ CI/CD Integration

Jenkins

Use the included Jenkinsfile:

pipeline {
    agent any
    stages {
        stage('Run Tests') {
            steps {
                sh 'mvn clean test'
            }
        }
    }
}

GitHub Actions

Use .github/workflows/appium-tests.yml:

name: Appium Tests
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run tests
        run: mvn clean test

πŸ“ˆ Performance

Execution Speed

  • Sequential: ~10 minutes for 20 tests
  • Parallel (4 devices): ~3 minutes for 20 tests
  • Speed Improvement: 3-10x faster

Resource Efficiency

  • Automatic port management
  • Device pooling with tier-based allocation
  • Result caching saves 30-70% execution time
  • Thread-safe execution with zero conflicts

πŸ› οΈ Technology Stack

  • Java 17+ - Modern Java features
  • Maven - Dependency management
  • Appium 2.x - Mobile automation
  • TestNG - Test framework
  • Cucumber - BDD support
  • ExtentReports - HTML reporting
  • Gson - JSON processing

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Appium Community - For the amazing mobile automation framework
  • ExtentReports - For beautiful reporting capabilities
  • FPGA Hardware Design - Inspiration for parallel architecture patterns

🌟 Star History

If you find Orchestrix useful, please consider giving it a star ⭐

Star History Chart


πŸ“ž Contact & Links


Built with ❀️ for enterprise mobile test automation

⬆ Back to Top

About

Orchestrix is the matrix that orchestrates your device testing and brings perfect synchronization to parallel test automation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published