Skip to main content

SHAFT Engine · open-source Java test automation framework

Write the test. SHAFT does the rest.

One Java engine for web, mobile, API, CLI, database, and desktop. Drivers, waits, and evidence are handled. Every run ends in an Allure report.

Your first run

  1. Generate project
  2. mvn test
  3. Inspect report

Already on Maven? Install SHAFT · See agent-to-evidence workflow

Real run, no mockups. A 3-line test, mvn test, and the report it writes.

Three lines in. A green report out.​

  1. Write

    QuickStartTest.java
    SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
    driver.browser()
    .navigateToURL("https://shafthq.github.io/")
    .and().element().assertThat(By.cssSelector("h1")).isVisible();
    driver.quit();
  2. Run

    Terminal
    $ mvn test
    [INFO] Running hero.QuickStartTest
    [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
    [INFO] BUILD SUCCESS
  3. Prove

Output from a real run of this test. Open the report to inspect every step, screenshot, and log.

Usage, measured​

Public SHAFT traffic from Google Analytics 4 (Engine property) and GitHub. Exact counts, not rounded up. As of 2026-10-29.

4,885,097Tests run in 30 days (2026-09-29 to 2026-10-28)
53,062Active users in 30 days (2026-09-29 to 2026-10-28)
154,202Active users in 12 months (2025-10-29 to 2026-10-28)
36Countries in 12 months (2025-10-29 to 2026-10-28)

Source: GA4 property Engine (504911558) + GitHub API. Stars on this page come from the live GitHub count (418 as committed baseline); releases snapshot 227.

See SHAFT in 100 seconds​

Why teams pick SHAFT for new Java suites, and how an existing Selenium suite moves over without a rewrite. Captions are on; nothing downloads until you press play.

  1. 0:00 Red build: bug or flaky test?
  2. 0:20 One engine on proven tools
  3. 0:36 Waits, reports and scale built in
  4. 0:57 Upgrade an existing suite
  5. 1:16 Open source, and how to start

Prefer the technical walkthrough? Watch it in the quick start.

From intent to reviewable Java and evidence.​

Capture a flow, review the Java it generates, and diagnose failures from the evidence. Engineers stay in control; leads get a release signal they can inspect.

Capture lifecycle

capture_start capture_stop capture_generate_replay

Capture an approved flow, review generated native Java, then retain replay evidence with the recording.

Reviewed native Java
SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
driver.browser().navigateToURL("https://example.com");
driver.element().click(By.id("submit"));

Model choice remains with the MCP client. Tests remain ordinary Java. Proposals do not silently edit, approve, or merge.

Pick your starting point​

Most teams start with one of these three. Upgrading an older suite? The quick start also covers the existing-project upgrade.

Upgrade a Java project

Move an existing Maven suite onto current SHAFT and run one test.

Upgrade a project

Run in CI

Run the suite headlessly and keep the report.

Run in CI

Agents and IDE

Surfaces and infrastructure

One evidence model across six test surfaces​

Each surface runs on its native engine. The suite, the API style, and the report stay the same.

Native engine

Selenium WebDriver

Actions, screenshots, trace context, and Allure steps.

Read web guide
Web SHAFT snippet
SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
driver.browser().navigateToURL("https://example.com");
driver.element().click(By.id("submit"));

Open, current, and checked​

Common questions

What is SHAFT Engine?

SHAFT Engine is an open-source Java test automation engine for web, mobile, API, CLI, database, and desktop. It wraps Selenium, Appium, and REST Assured behind one fluent API and writes an Allure report on every run. The user guide is at https://shafthq.github.io/.

Is SHAFT free to use?

Yes. SHAFT is open source under the MIT license.

Do I have to rewrite my Selenium tests?

No. Move an existing Maven suite onto current SHAFT and run one test first. See Upgrade a project in the user guide.

Which Java version do I need?

Java 25. Installation lists the rest.

What Maven coordinate do I use?

Use io.github.shafthq:shaft-engine with the version from Maven Central (or shaft-bom). The legacy SHAFT_ENGINE coordinate is a relocation only.

Who created SHAFT_ENGINE?

Mohab Mohie created SHAFT_ENGINE and maintains it with the ShaftHQ community. See the Welcome blog post on the user guide.

إيه إطار Java ينفع لاختبارات Selenium وAppium والـ API والـ desktop؟

SHAFT Engine إطار أتمتة اختبارات مفتوح المصدر بلغة Java بيغطي الويب والموبايل والـ API والـ CLI وقواعد البيانات والـ desktop. مبني على Selenium وAppium وREST Assured، وبيطلع تقرير Allure مع كل تشغيل. الدليل: https://shafthq.github.io/.

SHAFT مجاني؟

أيوه. SHAFT مفتوح المصدر بترخيص MIT.

مين عمل SHAFT_ENGINE؟

مهاب محيي (Mohab Mohie) منشئ SHAFT_ENGINE، وبيحافظ عليه مع مجتمع ShaftHQ. شوف تدوينة Welcome على دليل المستخدم.

Write your first test today.

Generate a starter project, read the guide, or star the repo so other testers find it.