Skip to content

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!

License

Notifications You must be signed in to change notification settings

ShaftHQ/SHAFT_ENGINE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 Β Β Β Β Β Β JetBrains Β Β Β Β LambdaTest

Trusted solution of choice for: 1

_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 Β Β Β Β Β Β Baianat Β Β Β Β Β Β 



πŸ“š User Guide:

  • Check out our comprehensive and friendly user guide to learn why SHAFT should be your solution of choice if you're aiming for successful test automation.
  • 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!

Supported Platforms:

Web:

Linux macOS Windows Android iOS
Google Chrome βœ… βœ… βœ… βœ… βœ…
Microsoft Edge βœ… βœ… βœ… _ _
Mozilla Firefox βœ… βœ… βœ… _ _
Apple Safari _ βœ… _ _ βœ…

Apps:

Android iOS Windows
Native βœ… βœ… N/A
Hybrid βœ… βœ… N/A
Flutter βœ… βœ… N/A
WPF N/A N/A βœ…

Other:

API Database CLI PDF JSON YAML Excel Property
βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…

Built-in features:

  • SHAFT also provides a lot of out-of-the-box convenience features to facilitate your testing process:

Test orchestration:

TestNG JUnit5 Cucumber
βœ… βœ… βœ…

Test authoring (Maintainability):

Fluent design Locator builder Native WebDriver access Element/Browser validations builder AI-powered visual validations
βœ… βœ… βœ… βœ… βœ…

Reliability:

Auto synchronization Logging Reporting Screenshots/Attachments Video recording
βœ… βœ… βœ… βœ… βœ…

Scalability:

CI/CD integration Cloud device farm integration Headless testing Parallel execution Containerized execution
βœ… βœ… βœ… βœ… βœ…

πŸ‘¨β€πŸ’» 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:

  • Join us via Slack & Facebook
    automatest-workspace Automatest
  • And feel free to create PRs directly. This lovely tutorial will help.

πŸƒ Quick Start Guide:

Option 1: Maven Archetype

(Recommended for new local sandbox projects)

  • The easiest and most straightforward way to create a new project that uses SHAFT.
  • Just follow the simple steps here to generate your new project with one command (all configurations included).

Option 2: Template Project

(Recommended for new source controlled projects)

  • Use our Template Project to create a new project with one click.
  • Follow the steps in the ReadMe to handle project configuration.

Option 3: Start from scratch

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

Step 1: Initial Setup

  • Create a new Java/Maven project using Eclipse, IntelliJ or your favourite IDE.
  • Copy the highlighted contents of this pom.xml file into yours inside the <project> tag.
  • Follow the steps in this footnote in case you are using IntelliJ2.

Step 2: Creating Tests

  • Create a new Package TestPackage under src/test/java and create a new Java Class TestClass under that package.
  • Copy the below imports into your newly created java class.
import com.shaft.driver.SHAFT;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
  • Copy the below code snippet into your newly created java class.
SHAFT.GUI.WebDriver driver;
SHAFT.TestData.JSON testData;

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.
{
  "searchQuery": "SHAFT_Engine"
}

Step 4: Running Tests

  • Run your TestClass.java as a TestNG Test Class.
  • The execution report will open automatically in your default web browser after the test run is completed.
  • Join our GitHub Repo stars to get notified by email when a new release is pushed out.
  • After upgrading your Engine to a new major release it is sometimes recommended to delete the properties folder src\main\resources\properties and allow SHAFT to regenerate the defaults by running any test method.



Stop Reinventing the wheel! Start using SHAFT!

Footnotes

  1. Company names are collected via anonymous surveys and provided freely by engineers who claimed to be using SHAFT_Engine within these companies. ↩

  2. If you're using Cucumber due to a known issue with IntelliJ you need to edit your run configuration template before running your tests by following these steps:
    - Open 'Edit Run/Debug Configurations' dialog > Edit Configurations... > Edit configuration templates...
    - Select Cucumber Java > Program Arguments > and add this argument:
    --plugin com.shaft.listeners.CucumberFeatureListener
    - After saving the changes, remember to delete any old runs you may have triggered by mistake before adding the needed config. ↩

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

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Languages