https://github.com/coedotzmagic/drivebydataxcel
DriveByDataXCel is a data-driven testing plugin that reads Excel files and maps them into structured data for use in Selenium, Katalon, and other automation frameworks.
https://github.com/coedotzmagic/drivebydataxcel
automation automation-testing automation-tools coedotzmagic data-driven data-driven-testing excel java katalon plugin selenium
Last synced: 5 months ago
JSON representation
DriveByDataXCel is a data-driven testing plugin that reads Excel files and maps them into structured data for use in Selenium, Katalon, and other automation frameworks.
- Host: GitHub
- URL: https://github.com/coedotzmagic/drivebydataxcel
- Owner: CoedotzMagic
- License: apache-2.0
- Created: 2025-08-23T21:32:52.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-23T23:05:50.000Z (5 months ago)
- Last Synced: 2025-08-24T01:49:32.123Z (5 months ago)
- Topics: automation, automation-testing, automation-tools, coedotzmagic, data-driven, data-driven-testing, excel, java, katalon, plugin, selenium
- Language: Java
- Homepage: https://coedotzmagic.com/
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DriveByDataXCel
DriveByDataXCel is a lightweight, flexible plugin designed for automation testing tools like Selenium, Katalon, and others, enabling seamless data-driven testing using Excel (.xlsx) files. It reads structured data from Excel, maps it into an array of key-value pairs (array of map), and feeds the data into your automation scripts for reliable and repeatable test execution.
Whether you're managing test inputs, form submissions, or multiple test cases with dynamic data, DriveByDataXCel simplifies the process of integrating Excel-based test data into your automated workflows.
# Key Features
📄 Reads Excel (.xlsx) files and parses them into an array of maps
🔄 Supports data-driven testing with tools like Selenium, Katalon, WebDriver, etc.
⚡ Improves test reusability by separating test logic and test data
🔌 Easy integration into existing automation frameworks or CI/CD pipelines
🖥️ Cross-platform support (Windows, macOS, Linux)
# Use Case Examples
- Fill web forms using Excel data in Selenium
- Loop through multiple test cases using different Excel rows
- Parameterize test inputs in Katalon using structured Excel maps
- Use Excel as an external test data provider for consistent automation
# How to Use
## General Use
```java
String filePath = "testingDataDriven.xlsx"; // target file, must specify full path
String sheetName = "Sheet1"; // name of the sheet to access
List> testData = DriveByDataXCel.readTestDataFromExcel(filePath, sheetName);
int rowNum = 1;
for (Map row : testData) {
if (isRowValid(row, rowNum)) {
System.out.println("Username: " + row.get("username"));
System.out.println("Password: " + row.get("password"));
} else {
System.out.println("[Warning] Skipping row " + rowNum + " due to missing or empty fields.");
}
rowNum++;
}
private boolean isRowValid(Map row, int rowNum) {
String[] requiredFields = {"username", "password"};
for (String field : requiredFields) {
String value = row.get(field);
if (value == null || value.trim().isEmpty()) {
System.err.println("[Error] Missing or empty value for '" + field + "' in row " + rowNum);
return false;
}
}
return true;
}
```
## TestNG / Unit Test
#### DataDrivenProvider.java
```java
import com.coedotzmagic.drivebydataxcel.DriveByDataXCel;
String filePath = "testingDataDriven.xlsx"; // target file, must specify full path
String sheetName = "Sheet1"; // name of the sheet to access
public class DataDrivenProvider {
public static Object[][] getDataFromExcel(String filePath, String sheetName) {
List> testData = DriveByDataXCel.readTestDataFromExcel(filePath, sheetName);
List> validData = new ArrayList<>();
int rowNum = 1;
for (Map row : testData) {
if (isRowValid(row, rowNum)) {
validData.add(row);
} else {
System.out.println("[Warning] Skipping row " + rowNum + " due to missing or empty fields.");
}
rowNum++;
}
Object[][] data = new Object[validData.size()][1];
for (int i = 0; i < validData.size(); i++) {
data[i][0] = validData.get(i);
}
return data;
}
private static boolean isRowValid(Map row, int rowNum) {
String[] requiredFields = {"username", "password"};
for (String field : requiredFields) {
String value = row.get(field);
if (value == null || value.trim().isEmpty()) {
System.err.println("[Error] Missing or empty value for '" + field + "' in row " + rowNum);
return false;
}
}
return true;
}
@DataProvider(name = "TestData")
public static Object[][] getTestData() {
return getDataFromExcel(filePath, sheetName);
}
}
```
#### File Testing
```java
@Test(priority = 1, dataProvider = "TestData", dataProviderClass = DataDrivenProvider.class)
public void ExecuteTest(Map data) throws Exception {
System.out.println("Username: " + data.get("username"));
System.out.println("Password: " + data.get("password"));
}
```