An open API service indexing awesome lists of open source software.

https://github.com/abdelrhman-ellithy/ellithium

Ellithium is a Unified powerful, flexible Test Automation Framework for Web, Mobile, API, DB Testing, designed to streamline and enhance the testing process. it provides an end-to-end solution for automated testing. With support for BDD, cross-browser testing,
https://github.com/abdelrhman-ellithy/ellithium

appium-framework automation java mobile-testing mobiletesting sdet selenium-webdriver software-developement software-testing test-automation test-automation-framework test-automation-java testing testing-tools

Last synced: 10 months ago
JSON representation

Ellithium is a Unified powerful, flexible Test Automation Framework for Web, Mobile, API, DB Testing, designed to streamline and enhance the testing process. it provides an end-to-end solution for automated testing. With support for BDD, cross-browser testing,

Awesome Lists containing this project

README

          

# πŸŒ€ Ellithium




Ellithium






Codacy


License


Codacy


Udemy Course


Documentation


## πŸŒ€ Unified Test Automation Framework for Web, Mobile, API, SQL and NoSQL DBs TestingπŸš€

**Ellithium** is a Unified powerful, flexible, and scalable test automation framework designed to streamline and enhance the testing process. Leveraging tools such as **TestNG**, **Cucumber**, **Rest Assured**, and others, it provides an end-to-end solution for automated testing. With support for **BDD**, **cross-browser testing**, **parallel execution**, **headless testing**, and detailed **Allure reporting**, Ellithium aims to make your test automation faster, more reliable, and easier to maintain.

### πŸ‘¨β€πŸ’» Supported Testing PlatForms
|Web |Mobile| API|DB|
| :---: |:---: |:---: |:---: |
| βœ… |βœ… |βœ… |βœ… |

### πŸš€ Supported DB Types with Caching Mechanisms πŸš€
|Mongo | Couchebase |Redis | MY_SQL| SQL_SERVER | ORACLE | IBM_DB2| POSTGRES_SQL|SQLITE |
| :---: |:---: |:---: |:---: |:---: |:---: |:---: |:---: |:---: |
| βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |

### πŸš€ Key Features

|BDD Support|Parallel Execution|Cross-Browser Testing|Headless Testing|Logging|Screenshots Attaching|User Stories Linking|Reporting|Command line Executor Interface|Synchronization Handling | CI/CD integration |Test Data Generation|
|:--------:|:--------:|:--------:|:------:|:------:|:------:|:------:|:-----:|:------:|:---: |:---: |:---: |
|βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |βœ… |

- **Allure Reporting**: Generate rich, interactive test reports with **Allure**, including test history and trend analysis.
- **Modular Design**: A well-structured and modular framework promoting code reuse and easy maintenance.
- **Executing OS Commands**: Execute system commands via the built-in **Command Executor Interface**.
- **API Testing**: Full support for API testing with **Rest Assured** for RESTful services.
- **Database Testing**: Extends coverage to both SQL and NoSQL databases, including MySQL, SQL Server, PostgreSQL, Oracle, IBM DB2, SQLite, Couchbase, MongoDB, and Redis, enabling comprehensive backend testing.
- **Mobile Testing**: Test native, hybrid, and mobile apps on Android and IOS, with Appium integration and support for real devices and emulators.
- **Test Data Generation**: Dynamically generate test data using **Java Faker** for realistic names, emails, addresses, and more.
- **CI/CD Integration**: Seamless integration with popular CI/CD tools such as **Jenkins**, **GitHub Actions**, and **GitLab**.
- **Exception Handling**: Robust mechanisms for capturing exceptions during test execution.

### πŸ‘¨β€πŸ’» Supported OS with OS Command Executor Interface for Desktop OS

|Windows|Mac|Linux|Android|IOS|
|:-----:|:--:|:--:|:--:|:--:|
|βœ… |βœ… |βœ… |βœ… |βœ… |

### πŸ“„ Supported File Formats for Reading and Writing

Ellithium supports reading and writing data from various file formats, including:

|JSON|CSV|Excel|Properties|Jar|PDF|Text|
|:---:|:--:|:---:|:-----:|:--:|:--:|:--:|
|βœ… |βœ… |βœ… | βœ… |βœ… |βœ… |βœ… |

## πŸ‘¨β€πŸ’» Developed using:


Java
Maven
IntelliJ IDEA
VS Code


## 🦸 Powered by:


Selenium WebDriver
REST Assured
Cucumber.io
TestNG
Allure Reports
Appium
HikariCP


## πŸ“š Documentation

For comprehensive documentation and user guides, visit our official documentation site:

- [**User Guide & Documentation**](https://abdelrhman-ellithy.github.io/ellithium.github.io/) - Complete documentation including:
- Detailed setup instructions
- Framework architecture
- API documentation
- Best practices
- Configuration guides
- Examples and tutorials

### Prerequisites

Ensure you have the following installed:
- **Java Development Kit (JDK)**: 21 preferred
- **Maven**: 3.8.1 or higher (last version 3.9.9 recommended)

## 🏁 Getting Started

- **Follow these steps to set up a new Maven project with Ellithium:**
Here is the updated **Getting Started** section formatted for your README file:

---
### Step 1: Create a New Maven Project

- **Create a new Maven project using your preferred IDE (e.g., IntelliJ IDEA).**

### Step 2: Update the `pom.xml`

- **Add the following configuration to your `pom.xml` to set the Java version, include the required dependencies, and configure the plugins.**

```xml

21
21
UTF-8
2.1.1

io.github.abdelrhman-ellithy
ellithium
${Ellithiumversion}



org.apache.maven.plugins
maven-compiler-plugin
3.14.0

21
21


org.apache.maven.plugins
maven-surefire-plugin
3.5.3

${project.build.directory}/surefire-reports
true
false

true

false
false
false
UTF-8


listener
Ellithium.core.execution.listener.CustomTestNGListener





org.codehaus.mojo
exec-maven-plugin
3.5.0


intialize
initialize

java


Ellithium.core.execution.Internal.Loader.StartUpLoader
true
compile




src/main/resources/properties

**/*

```

### Step 3: Open the Termenal in the Project directory then run this command
```bash
mvn clean test
```

### Option 1: BDD Mode With Cucumber
- **[Demo-Project](https://github.com/Abdelrhman-Ellithy/Noon-Shopping-Website-Manual-Automation-) for setup use after follow the following steps**
### Step 1: Create a Test Runner Class

- **Create a Runner Package then create a new class named TestRunner that extends the `BDDSetup` class from Ellithium**.
- **Specify the paths for your feature files and step definitions using the `@CucumberOptions`.**

```java
package Runner;

import Ellithium.core.base.BDDSetup;
import io.cucumber.testng.CucumberOptions;

@CucumberOptions(
glue = "stepDefinitions", // path to your stepDefinitions package, note you should use . instead of /
features = "src/main/resources/features" // path to your features folder
, tags = "@Run"
)
public class TestRunner extends BDDSetup {
}
```

### Step 2: To Create a BaseStepDefinitions Class.

- **Create a BaseStepDefinitions class that will be used to extend the other StepDefinitions Classes from it**.

```java
package Base;

import Ellithium.core.driver.DriverFactory;
import org.openqa.selenium.WebDriver;

public class BaseStepDefinitions {
protected WebDriver driver;

protected AndroidDriver androidDriver;
protected IOSDriver iosDriver;

public BaseStepDefinitions() {

// for Local Machine Web Execution
driver= DriverFactory.getNewLocalDriver(LocalDriverType.Chrome, HeadlessMode.False, PrivateMode.True, PageLoadStrategyMode.Normal,WebSecurityMode.SecureMode,SandboxMode.Sandbox);

// for Remote Machine Web Execution
driver= DriverFactory.getNewRemoteDriver(RemoteDriverType.Remote_Chrome,new URL("http://localhost:4723"),capabilities, HeadlessMode.False, PrivateMode.True, PageLoadStrategyMode.Normal,WebSecurityMode.SecureMode,SandboxMode.Sandbox);

// for Android Mobile
androidDriver= DriverFactory.getNewMobileDriver(MobileDriverType.Android,new URL("http://localhost:4723"),options);

// for IOS Mobile
iosDriver=DriverFactory.getNewMobileDriver(MobileDriverType.IOS,new URL("http://localhost:4723"),options);

// using config builder (after release 2.03)

DriverConfigBuilder driverConfig=new LocalDriverConfig(LocalDriverType.Chrome, // same for RemoteDriverConfig, MobileDriverConfig
HeadlessMode.False, PrivateMode.False,
PageLoadStrategyMode.Normal,
WebSecurityMode.SecureMode,
SandboxMode.Sandbox);
driver=DriverFactory.getNewDriver(driverConfig);

// for DB SQL Provider [MY_SQL, SQL_SERVER, POSTGRES_SQL, ORACLE_SID, ORACLE_SERVICE_NAME, IBM_DB2]
SQLDatabaseProvider db=new SQLDatabaseProvider(
SQLDBType.MY_SQL,
username,
password,
serverIp,
port,
dbName);
}
// for DB SQL Provider [SQLite]
SQLDatabaseProvider SQLitedb= SQLDatabaseProvider( SQLDBType.SQLITE, pathToSQLiteDataBase);

// for NoSQL DB Provider
CouchbaseDatabaseProvider couchDB=CouchbaseDatabaseProvider(connectionString, username, password, bucketName);
MongoDatabaseProvider mongoDB=MongoDatabaseProvider( connectionString, dbName);
RedisDatabaseProvider redisDB=RedisDatabaseProvider( connectionString);
}
}

```
- **The default values for WebDriver** if you **didn't pass all the paramaters** are:

```java
@default("false") String HeadlessMode, // can be true or false (Not Supported with Safari)
@default("Normal") String PageLoadStrategy, // can be Normal or Eager
@default("False") String PrivateMode, // can be true or false
@default("Sandbox") String SandboxMode, // can be Sandbox or NoSandbox (Not Supported with Safari)
@default("True") String WebSecurityMode // can be True or False (Not Supported with Safari)
```

### Option 2: default Mode
- **[Demo-Project](https://github.com/Abdelrhman-Ellithy/The-Internet-Herokuapp) for setup use after follow the following steps**
### Step 1: Create a BaseTest Class

- **Create a UI_BDD Package then create a new class named BaseTest that extends the `NonBDDSetup` class from Ellithium**.

```java
package UI_NonBDD;

import Ellithium.core.driver.DriverFactory;
import Ellithium.core.base.NonBDDSetup;
import org.openqa.selenium.WebDriver;
import org.testng.annotations.*;

public class BaseTests {
WebDriver driver;

// with Web and the Same Logic for Other
@BeforeClass
public void Setup() {


// for Local Machine Web Execution
driver = DriverFactory.getNewLocalDriver(LocalDriverType.Chrome, HeadlessMode.False, PrivateMode.True, PageLoadStrategyMode.Normal, WebSecurityMode.SecureMode, SandboxMode.Sandbox);

// for Remote Machine Web Execution
driver = DriverFactory.getNewRemoteDriver(RemoteDriverType.Remote_Chrome, new URL("http://localhost:4723"), capabilities, HeadlessMode.False, PrivateMode.True, PageLoadStrategyMode.Normal, WebSecurityMode.SecureMode, SandboxMode.Sandbox);

// for Android Mobile
androidDriver = DriverFactory.getNewMobileDriver(MobileDriverType.Android, new URL("http://localhost:4723"), options);

// for IOS Mobile
iosDriver = DriverFactory.getNewMobileDriver(MobileDriverType.IOS, new URL("http://localhost:4723"), options);

// for DB SQL Provider [MY_SQL, SQL_SERVER, POSTGRES_SQL, ORACLE_SID, ORACLE_SERVICE_NAME, IBM_DB2]
SQLDatabaseProvider db = new SQLDatabaseProvider(
SQLDBType.MY_SQL,
username,
password,
serverIp,
port,
dbName);


// using config builder (after release 2.03)

DriverConfigBuilder driverConfig=new LocalDriverConfig(LocalDriverType.Chrome, // same for RemoteDriverConfig, MobileDriverConfig
HeadlessMode.False, PrivateMode.False,
PageLoadStrategyMode.Normal,
WebSecurityMode.SecureMode,
SandboxMode.Sandbox);
driver=DriverFactory.getNewDriver(driverConfig);

}

// for DB SQL Provider [SQLite]
SQLDatabaseProvider SQLitedb = SQLDatabaseProvider(SQLDBType.SQLITE, pathToSQLiteDataBase);

// for NoSQL DB Provider
CouchbaseDatabaseProvider couchDB = CouchbaseDatabaseProvider(connectionString, username, password, bucketName);
MongoDatabaseProvider mongoDB = MongoDatabaseProvider(String connectionString, String dbName);
RedisDatabaseProvider redisDB = RedisDatabaseProvider(String connectionString);
}

@AfterClass
public void tareDown() {
DriverFactory.quitDriver();
}
}
```
- **Complete your logic as you like here after that**
- **this class will be used to extend the other classes from it**
- **as here in step 2**
### Step 2: Create a another Test Class and extend from the BaseTests class

```java
package UI_BDD;

import Base.BaseTests;
import Ellithium.Utilities.assertion.AssertionExecutor;
import Pages.LoginPage;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

public class loginTests extends BaseTests {
@DataProvider(name = "invalidLoginData")
Object[][] getInvalidTestData() {
return new Object[][]{
{"tomsmith", "hamada", "Your password is invalid"},
{"hamada", "SuperSecretPassword!", "Your username is invalid"}
};
}

LoginPage login;

@Test(priority = 1, dataProvider = "invalidLoginData")
public void invalidLogin(String username, String password, String expectedMessage) {
login = home.clickFormAuthentication();
login.setUserName(username);
login.setPassword(password);
var secureAreaPage = login.clickLoginBtn();
String actualMessage = secureAreaPage.getLoginMassega();
AssertionExecutor.hard.assertTrue(actualMessage.contains(expectedMessage));
}

@Test(priority = 2)
public void validLogin() {
login = home.clickFormAuthentication();
login.setPassword("SuperSecretPassword!");
login.setUserName("tomsmith");
var secureAreaPage = login.clickLoginBtn();
String actualMessage = secureAreaPage.getLoginMassega();
String expectedMessage = "You logged into a secure area!";
AssertionExecutor.hard.assertTrue(actualMessage.contains(expectedMessage));
}
}
```
### Step 3: Use Driver Actions Class to Perform actions on Web and Mobile, as It handles many steps and syncronization

```java
package Pages;

import Ellithium.Utilities.interactions.DriverActions;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class LoginPage {
WebDriver driver;
DriverActions driverActions;
public LoginPage(WebDriver driver) {
this.driver=driver;
driverActions=new DriverActions(driver);
}
public void setUserName(String username){
// locator, data , timeout, polling time
driverActions.elements().sendData(By.id("username"),username, 5, 200);
}
public void setPassword(String password){
// locator, data , timeout
driverActions.elements().sendData(By.id("password"),password, 5);
}
public SecureAreaPage clickLoginBtn(){
// locator
driverActions.elements().clickOnElement(By.tagName("button"));
return new SecureAreaPage(driver);
}

}

```
### *This should cover the steps to get your **Ellithium** framework up and running in a new Maven project.*

## πŸ“¬ Contact

- **For questions, suggestions, or feedback, feel free to reach out to Abdelrahman Ellithy**
**at [abdelarhmanellithy@gmail.com](mailto:abdelarhmanellithy@gmail.com).**

---