TAFLEX JS
Enterprise Test Automation Framework
๐ฏ What is TAFLEX JS?โ
TAFLEX JS is a unified, enterprise-grade test automation framework designed for testing Web, API, and Mobile applications using a single codebase. Migrated from the original Java-based architecture, it leverages modern Node.js (ESM), Playwright, and WebdriverIO to deliver fast, reliable, and maintainable automation.
โจ Key Highlightsโ
| Feature | Description |
|---|---|
| ๐ Quick Setup | Modern npm-based workflow with automated setup and comprehensive guides. |
| ๐งฉ Strategy Pattern | Runtime driver resolution between platforms. Native BDD support via Gherkin. |
| ๐ Hierarchical Locators | All selectors stored in JSON files with Page > Mode > Global inheritance model. |
| ๐ก๏ธ Type-Safe Config | Environment variables are strictly validated at runtime using Zod. |
| ๐๏ธ Database Integration | Native support for PostgreSQL and MySQL query orchestration. |
| ๐ Modern Reporting | Integrated Allure reports and Playwright's native HTML reporter. |
๐ Quick Startโ
Get up and running in 3 simple steps:
1. Clone and Setupโ
# Clone the repository
git clone https://github.com/vinipx/taflex-js.git
cd taflex-js
# Run the automated setup
./setup.sh
2. Configure Environmentโ
The setup.sh script creates a .env file for you. Simply update it with your settings:
# Update with your specific credentials
nano .env
3. Run Your First Testโ
# Run all tests
npm test
# Run unit tests
npm run test:unit
๐๏ธ Architecture Overviewโ
๐ป Code Exampleโ
Web Testโ
import { test, expect } from '../fixtures.js';
test('should login successfully', async ({ driver }) => {
// Navigate using unified driver
await driver.navigateTo('https://the-internet.herokuapp.com/login');
// Load page-specific locators
await driver.loadLocators('login');
// Use platform-agnostic element API
await (await driver.findElement('username_field')).fill('tomsmith');
await (await driver.findElement('password_field')).fill('SuperSecretPassword!');
await (await driver.findElement('login_button')).click();
// Fluent assertions
const flashMessage = await driver.findElement('flash_message');
expect(await flashMessage.getText()).toContain('You logged into a secure area!');
});
๐ฏ Who Should Use TAFLEX JS?โ
| Role | Benefits |
|---|---|
| QA Engineers & Testers | Low-code locator management ยท High-level unified API ยท Automatic retries & screenshots ยท Beautiful reports. |
| Developers | Modern ESM codebase ยท Strategy pattern extensibility ยท Zod validation ยท Fast Vitest suite. |
| Managers | Unified stack for Web/API/Mobile ยท Reduced tech debt ยท Detailed dashboards ยท High execution ROI. |
| DevOps Engineers | Docker-ready ยท Seamless GitHub Actions integration ยท Parallel execution by default. |
๐ค Contributingโ
We welcome contributions! Please see our Contributing Guidelines for details.
๐ Licenseโ
TAFLEX JS is licensed under the MIT License.
Happy Testing! ๐