Skip to main content

TAFLEX JS

Enterprise Test Automation Framework

Build Status Version License Node.js


๐ŸŽฏ 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โ€‹

FeatureDescription
๐Ÿš€ Quick SetupModern npm-based workflow with automated setup and comprehensive guides.
๐Ÿงฉ Strategy PatternRuntime driver resolution between platforms. Native BDD support via Gherkin.
๐Ÿ“„ Hierarchical LocatorsAll selectors stored in JSON files with Page > Mode > Global inheritance model.
๐Ÿ›ก๏ธ Type-Safe ConfigEnvironment variables are strictly validated at runtime using Zod.
๐Ÿ—„๏ธ Database IntegrationNative support for PostgreSQL and MySQL query orchestration.
๐Ÿ“Š Modern ReportingIntegrated 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?โ€‹

RoleBenefits
QA Engineers & TestersLow-code locator management ยท High-level unified API ยท Automatic retries & screenshots ยท Beautiful reports.
DevelopersModern ESM codebase ยท Strategy pattern extensibility ยท Zod validation ยท Fast Vitest suite.
ManagersUnified stack for Web/API/Mobile ยท Reduced tech debt ยท Detailed dashboards ยท High execution ROI.
DevOps EngineersDocker-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! ๐Ÿš€