ShaftHQ / SHAFT_ENGINE

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!
https://shafthq.github.io/
MIT License
324 stars 123 forks source link
api appium appium-framework appium-java automation automation-engine e2e-testing end-to-end-testing java mobile restassured restassured-framework selenium selenium-grid selenium-webdriver test-automation test-automation-framework testing-framework testing-tools web

SHAFT: Unified Test Automation Engine

SHAFT_ENGINE
Fully documented

User Guide
Award Winning

Google Open Source
Selenium Ecosystem

Selenium Ecosystem

Tech for Palestine
License Contributors Latest Release
E2E Tests Code QL
Codacy Codecov


🌍 Our success partners:

Sponsors:

BrowserStack       Applitools       LambdaTest       JetBrains

Trusted solution of choice for: [^4]

_VOIS (Vodafone Intelligent Solution)      GET Group Holdings      MOMRA (Saudi Arabia's Ministry of Municipal and Rural Affairs)      Vodafone Egypt      Solutions by STC      GIZA Systems      Euronet      Terkwaz Business Solutions      Incorta      BayanTech      Adam.ai      ACT Global Soft      elmenus      IDEMIA      iHorizons      Robusta      Paymob Solutions      Jahez Group      Salt Bank

[^4]: Company names are collected via anonymous surveys and provided freely by engineers who claimed to be using SHAFT_Engine within these companies.



📚 User Guide:

Supported Platforms:

Web:

Linux macOS Windows Android iOS
Google Chrome :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
Microsoft Edge :white_check_mark: :white_check_mark: :white_check_mark: _ _
Mozilla Firefox :white_check_mark: :white_check_mark: :white_check_mark: _ _
Apple Safari _ :white_check_mark: _ _ :white_check_mark:

Apps:

Android iOS Windows
Native :white_check_mark: :white_check_mark: N/A
Hybrid :white_check_mark: :white_check_mark: N/A
Flutter :white_check_mark: :white_check_mark: N/A
WPF N/A N/A :white_check_mark:

Other:

API Database CLI PDF JSON YAML Excel Property
:white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

Built-in features:

Test orchestration:

TestNG JUnit5 Cucumber
:white_check_mark: :white_check_mark: :white_check_mark:

Test authoring (Maintainability):

Fluent design Locator builder Native WebDriver access Element/Browser validations builder AI-powered visual validations
:white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

Reliability:

Auto synchronization Logging Reporting Screenshots/Attachments Video recording
:white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

Scalability:

CI/CD integration Cloud device farm integration Headless testing Parallel execution Containerized execution
:white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:


👨‍💻 Tech Stack:

Developed using:

Java Maven       IntelliJ IDEA

Powered by:

Selenium WebDriver       Appium       REST Assured       TestNG       Allure Reports       Cucumber.io       OpenCV       Selenium Grid       GitHub Actions       Dependabot       CodeQL       Codacy       JaCoCo       CodeCov       sonatype

🤝 Support & Contributions:

🏃 Quick Start Guide:

Option 1: Maven Archetype

(Recommended for new local sandbox projects)

Option 2: Template Project

(Recommended for new source controlled projects)

Option 3: Start from scratch

(Recommended if you're upgrading an existing project from Native Selenium WebDriver to SHAFT)

Step 1: Initial Setup

Step 2: Creating Tests

By searchBox = By.name("q"); By resultStats = By.id("result-stats");

@Test public void test() { driver.browser().navigateToURL("https://www.google.com/"); driver.verifyThat().browser().title().isEqualTo("Google").perform(); driver.element().type(searchBox, testData.getTestData("searchQuery")) .keyPress(searchBox, Keys.ENTER); driver.assertThat().element(resultStats).text().doesNotEqual("") .withCustomReportMessage("Check that result stats is not empty").perform(); }

@BeforeClass public void beforeClass() { driver = new SHAFT.GUI.WebDriver(); testData = new SHAFT.TestData.JSON("simpleJSON.json"); }

@AfterClass(alwaysRun = true) public void afterClass(){ driver.quit(); }


#### Step 3: Managing Test Data
- Create the following file ```src/test/resources/testDataFiles/simpleJSON.json```.
- Copy the below code snippet into your newly created json file.
```json
{
  "searchQuery": "SHAFT_Engine"
}

Step 4: Running Tests



Stop Reinventing the wheel! Start using SHAFT!