Skip to content

ShaftHQ/SHAFT_ENGINE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,448 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

SHAFT Engine Logo SHAFT : Unified Test Automation Engine

Stop reinventing the wheel. Write your tests once and run them everywhere β€” across browsers, devices, and APIs β€” with a single, fluent Java framework.

SHAFT Engine is an open-source Java test automation framework built on top of Selenium, Appium, and REST Assured. It provides a unified, fluent API for cross-browser testing, mobile app testing, API testing, CLI testing, and database testing β€” so you can automate anything, from any platform, with zero boilerplate.

GitHub Stars Maven Central License E2E Tests Code QL Codacy Codecov Contributors

Tech for Palestine - Ceasefire Now


πŸ† Recognition & Trust

Fully Documented

SHAFT Engine User Guide and Documentation
Award Winning

Google Open Source Peer Bonus Award Winner 2023
Selenium Ecosystem

Official Selenium Ecosystem Framework

πŸ“– Table of Contents


πŸš€ Why SHAFT?

If you're tired of managing a fragile patchwork of Selenium helpers, custom wrappers, and retry logic β€” you're not alone. SHAFT Engine replaces all of that with a single, battle-tested framework trusted by 41,000+ engineers across 10+ countries.

Built on industry-standard technologies β€” Selenium, Appium, and REST Assured β€” SHAFT gives you a fluent, chainable API that works across web browsers, mobile apps, REST APIs, databases, and CLIs. No more boilerplate. No more flaky tests. Just results.

What Makes SHAFT Different?

Feature What You Get
🎯 Unified API One fluent syntax for Web, Mobile, API, CLI, and Database testing
πŸ”§ Zero Boilerplate Smart auto-configuration β€” no WebDriverManager, no manual waits, no setup code
πŸ“Š Rich Reporting Built-in Allure integration with screenshots, videos, and detailed logs
πŸ€– AI-Powered Validation Visual testing with OpenCV and intelligent element detection
🌐 Cloud-Ready Native support for BrowserStack, LambdaTest, and Selenium Grid
βš™οΈ Any Test Runner Works with TestNG, JUnit 5, and Cucumber out of the box
🐳 Containerized Ready-to-use Docker support for CI/CD pipelines
πŸ“± Full Mobile Native, Hybrid, and Flutter apps on Android & iOS via Appium

Global Adoption

41,511 active users across 10+ countries trust SHAFT for their test automation needs β€” from startups to Fortune 500 companies.

View detailed analytics β†’


πŸ’‘ See the Difference

Stop writing dozens of lines of brittle Selenium boilerplate. Here's what SHAFT looks like compared to raw Selenium:

❌ Raw Selenium (verbose & fragile)

βœ… SHAFT Engine (clean & reliable)

WebDriver driver = new ChromeDriver();
driver.get("https://example.com");
WebDriverWait wait =
    new WebDriverWait(driver, Duration.ofSeconds(10));
WebElement el = wait.until(
    ExpectedConditions.visibilityOfElementLocated(
        By.name("q")));
el.sendKeys("SHAFT");
el.sendKeys(Keys.ENTER);
String title = driver.getTitle();
Assert.assertTrue(title.contains("SHAFT"));
driver.quit();
SHAFT.GUI.WebDriver driver =
    new SHAFT.GUI.WebDriver();
driver.browser().navigateToURL("https://example.com")
  .and().element().type(By.name("q"),
      "SHAFT" + Keys.ENTER)
  .and().assertThat().browser().title()
      .contains("SHAFT");
driver.quit();

Fewer lines. Automatic synchronization. Built-in assertions. Beautiful reports. That's SHAFT.


⚑ Quick Start

Get up and running in under 5 minutes!

Option 1: Interactive Project Generator πŸŽ‰ (Recommended)

The fastest way to create a new SHAFT project with a user-friendly web UI:

πŸ‘‰ Launch Project Generator

Choose your test runner (TestNG / JUnit 5 / Cucumber), select your platform (Web / Mobile / API), and download a ready-to-use project β€” complete with CI/CD configuration.

Option 2: Maven Archetype

Create a new project from the command line:

mvn archetype:generate \
  -DarchetypeGroupId=io.github.shafthq \
  -DarchetypeArtifactId=shaft-archetype

Option 3: Add to an Existing Project

Maven β€” add to your pom.xml
<dependency>
    <groupId>io.github.shafthq</groupId>
    <artifactId>SHAFT_ENGINE</artifactId>
    <!-- Get the latest version from Maven Central ↓ -->
    <version><!-- SEE BADGE BELOW --></version>
</dependency>
Gradle (Kotlin DSL) β€” add to your build.gradle.kts
dependencies {
    // Get the latest version from Maven Central ↓
    testImplementation("io.github.shafthq:SHAFT_ENGINE:<version>")
}

πŸ’‘ Check the latest version: Maven Central

Your First Test

import com.shaft.driver.SHAFT;
import org.openqa.selenium.By;
import org.testng.annotations.*;

public class QuickStartTest {
    SHAFT.GUI.WebDriver driver;

    @BeforeMethod
    public void setup() {
        driver = new SHAFT.GUI.WebDriver();
    }

    @Test
    public void searchTest() {
        driver.browser().navigateToURL("https://duckduckgo.com/")
              .and().element().type(By.name("q"), "SHAFT_Engine")
              .and().element().click(By.cssSelector("button[type='submit']"))
              .and().assertThat().browser().title().contains("SHAFT_Engine");
    }

    @AfterMethod(alwaysRun = true)
    public void teardown() {
        driver.quit();
    }
}

πŸ“– Complete Quick Start Guide β†’ β€” includes TestNG, JUnit 5, and Cucumber examples.


✨ Key Features

The 3 Pillars of Successful Test Automation

πŸ“ˆ Scalability 🎯 Reliability πŸ”§ Maintainability
CI/CD Integration Auto-Synchronization Fluent Design
Cloud Execution Rich Reporting Smart Locators
Parallel Testing Video Recording AI Validations
Containerization Screenshot Capture Zero Boilerplate

Platform Support

Category Supported
Browsers Chrome, Edge, Firefox, Safari (Desktop & Mobile)
Mobile Apps Native, Hybrid, Flutter (Android & iOS)
APIs REST (GET, POST, PUT, PATCH, DELETE) with full response validation
Databases MySQL, SQL Server, PostgreSQL, Oracle, IBM DB2, H2, MongoDB
Other CLI / Terminal, File Assertions (JSON, YAML, Excel, PDF, CSV)
Test Runners TestNG, JUnit 5, Cucumber BDD

πŸ“– Complete Feature List β†’ Β· Tech Stack β†’ Β· Architecture β†’


🌍 Success Partners

πŸ’Ž Sponsors

BrowserStack - Cross Browser Testing Platform Β Β Β Β  LambdaTest - Cloud Testing Platform Β Β Β Β  Applitools - Visual AI Testing

🏒 Trusted By Leading Organizations

Vodafone - Global Telecommunications Β Β  DXC Technology - IT Services Company Β Β  Euronet Worldwide - Electronic Payments Β Β  IDEMIA - Identity Technologies Β Β  GET Group Holdings - Secure Identity Solutions

View all partners β†’


πŸ“š Documentation

Resource Description
πŸ“– User Guide Comprehensive documentation, tutorials, and configuration reference
πŸ—οΈ Architecture Framework design, module overview, and Mermaid diagrams
πŸ› οΈ Tech Stack Technologies and libraries powering SHAFT
✨ Features Full feature list with platform compatibility matrix
πŸ“Š User Analytics Global adoption, geographic breakdown, and growth metrics

πŸ€– AI-Powered Code Exploration

Explore SHAFT Engine on Google Code Wiki

Explore SHAFT Engine on Google Code Wiki β†’

Browse, search, and understand the SHAFT Engine codebase using Google Code Wiki β€” Google's AI-powered code exploration tool. Ask questions about the code, navigate complex implementations, and get intelligent explanations of framework internals.


🀝 Community & Support

Join Our Community

Join SHAFT Engine on Slack Β Β Β Β  SHAFT Engine Facebook Community Group

Contributing

We love contributions from the community! Here's how you can get involved:

Read our Contributing Guidelines and Code of Conduct to get started.

⭐ Show Your Support

If SHAFT has saved you time or helped your team ship faster, please consider giving us a star. It helps others discover the project and motivates the team to keep improving it.

Star SHAFT Engine on GitHub


πŸ’– Sponsor

SHAFT Engine is free and open source, built with love by a dedicated community. If you or your organization benefit from SHAFT, consider sponsoring the project to help ensure its long-term sustainability.

Sponsor SHAFT Engine


πŸ“œ License

SHAFT Engine is released under the MIT License β€” free to use, modify, and distribute in personal and commercial projects.


SHAFT Engine - Unified Test Automation Framework for Java

Stop Reinventing the Wheel. Start Using SHAFT.

Made with ❀️ by the SHAFT community

⬆ Back to Top

About

SHAFT is a unified test automation engine for web, mobile, API, CLI, database, and desktop e2e testing. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve with no limitations! Stop reinventing the wheel! Upgrade now!

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages