Create a project
Generate a Maven project and run the sample.
Create a projectSHAFT Engine · open-source Java test automation framework
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
mvn testAlready on Maven? Install SHAFT · See agent-to-evidence workflow
mvn test, and the report it writes.Write
SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
driver.browser().navigateToURL("https://shafthq.github.io/")
.and().element().assertThat(By.cssSelector("h1")).isVisible();
driver.quit();
Run
$ mvn test
[INFO] Running hero.QuickStartTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
Prove
Output from a real run of this test. Open the report to inspect every step, screenshot, and log.
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.
Prefer the technical walkthrough? Watch it in the quick start.
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.
Evidence first
Run doctor_analyze_failed_allure or doctor_analyze_trace to classify evidence before reviewing a proposal.
classification: locator
evidence: failed Allure action and trace context
next step: review remediation guidance
Model choice remains with the MCP client. Tests remain ordinary Java. Proposals do not silently edit, approve, or merge.
Most teams start with one of these three. Upgrading an older suite? The quick start also covers the existing-project upgrade.
Generate a Maven project and run the sample.
Create a projectMove an existing Maven suite onto current SHAFT and run one test.
Upgrade a projectRun the suite headlessly and keep the report.
Run in CIEach surface runs on its native engine. The suite, the API style, and the report stay the same.
SHAFT.GUI.WebDriver driver = new SHAFT.GUI.WebDriver();
driver.browser().navigateToURL("https://example.com");
driver.element().click(By.id("submit"));
Native engine
Touch actions, device context, screenshots, and native trace evidence.
Read mobile guidedriver.touch().tap(SHAFT.GUI.Locator.accessibilityId("Views"));
driver.assertThat().element(By.id("screen")).exists().perform();
Native engine
The same click and type facade as web, with UIA control routing and report evidence.
Read desktop guideSHAFT.Properties.platform.set()
.targetPlatform("Windows")
.executionAddress("http://127.0.0.1:4723");
new DriverFactory().getHelper(DriverFactory.DriverType.APPIUM_WINDOWS);
SHAFT.API api = new SHAFT.API(apiFixtureUrl);
api.get("users").performRequest();
Native engine
Connection target, query result, validation, and report evidence.
Read database guideSHAFT.DB database = new SHAFT.DB("jdbc:h2:mem:test");
ResultSet rows = database.executeSelectQuery("SELECT 1");
Native engine
Commands, captured output, and validation in the same report.
Read cli guideString output = SHAFT.CLI.terminal()
.performTerminalCommand("echo Hello SHAFT");
Yes. SHAFT is open source under the MIT license.
No. Move an existing Maven suite onto current SHAFT and run one test first. Upgrade a project.
Java 25. Installation lists the rest.
Generate a starter project, read the guide, or star the repo so other testers find it.