Package Exports
- testgenius-ai
- testgenius-ai/dist/bin/testgenius.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (testgenius-ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
đ§ TestGenius AI
đ The Ultimate E2E Testing Framework
No coding required âĸ AI-powered automation âĸ Beautiful reports âĸ Zero complexity
⨠What Makes TestGenius Special?
| đ¯ For QA Engineers | đ For Developers | đ¨ For Everyone |
|---|---|---|
| âĸ No programming skills needed | âĸ TypeScript support | âĸ Beautiful HTML reports |
| âĸ Interactive test recording | âĸ Flexible configuration | âĸ Auto-screenshots on failure |
| âĸ Simple test objects | âĸ Extensible framework | âĸ Cross-platform support |
| âĸ One-command setup | âĸ Custom test runners | âĸ Zero dependencies |
đŦ See It In Action
đ List Your Tests
testgenius listđ Run Tests
testgenius run AUTH-001đ View Reports
testgenius reportđ Quick Start (3 Steps)
1ī¸âŖ Install
# Install latest version
npm install -g testgenius-ai
# Or explicitly install latest
npm install -g testgenius-ai@latest
# Check current version
testgenius --version
# Update to latest version
npm update -g testgenius-ai2ī¸âŖ Initialize
testgenius initCreates everything you need automatically!
3ī¸âŖ Start Testing
testgenius record # Record a new test
testgenius run # Run all tests
testgenius report # View resultsđĻ Version Management
đ Always Get the Latest Version
TestGenius AI automatically provides the latest version when you install:
# Install latest version (recommended)
npm install -g testgenius-ai
# Explicitly install latest
npm install -g testgenius-ai@latest
# Update existing installation
npm update -g testgenius-aiđ Check Your Version
# Check current version
testgenius --version
# Check version and look for updates
testgenius versionđ¯ Version Features
- Automatic Updates: npm always installs the latest version by default
- Version Checking: Built-in command to check for updates
- Backward Compatibility: New versions maintain compatibility with existing tests
- Release Notes: Check GitHub releases for detailed changes
đ Writing Tests (Super Simple!)
đ¯ Test File Structure
Create files in tests/ directory:
// tests/login-tests.js
module.exports = [
{
id: "LOGIN-001",
name: "Successful Login Test",
description: "Test login with valid credentials",
priority: "High",
tags: ["authentication", "login", "smoke"],
site: "https://example.com/login",
testData: {
username: "testuser@example.com",
password: "securepassword123"
},
task: "Navigate to login page, enter credentials, click login, verify dashboard access"
},
{
id: "LOGIN-002",
name: "Failed Login Test",
description: "Test login with invalid credentials",
priority: "Medium",
tags: ["authentication", "login", "validation"],
site: "https://example.com/login",
testData: {
username: "invalid@example.com",
password: "wrongpassword"
},
task: "Navigate to login page, enter invalid credentials, verify error message appears"
}
];đŦ Interactive Test Recording
Don't want to write tests manually? Use the recorder!
testgenius recordFollow the prompts and TestGenius will create your test automatically!
đ ī¸ Essential Commands
| Command | What It Does | Example |
|---|---|---|
testgenius init |
đ Setup your project | testgenius init |
testgenius record |
đŦ Record a new test | testgenius record |
testgenius list |
đ Show all tests | testgenius list |
testgenius run |
đ Run all tests | testgenius run |
testgenius run <id> |
đ¯ Run specific test | testgenius run LOGIN-001 |
testgenius report |
đ View results | testgenius report |
đ¯ Advanced Run Options
đ File-Based Execution
Run tests from specific files or multiple files:
# Run tests from a single file
testgenius run -f tests/auth-tests.js
# Run tests from multiple files
testgenius run --files tests/auth-tests.js tests/ui-tests.js
# Exclude specific files
testgenius run --exclude auth-tests.jsđ¯ Test ID Filtering
Run specific tests by their IDs:
# Run a single test by ID
testgenius run LOGIN-001
# Run multiple specific tests
testgenius run --testIds LOGIN-001 LOGIN-002 AUTH-001đˇī¸ Tag and Priority Filtering
Filter tests by tags or priority levels:
# Run tests with specific tag
testgenius run --tag smoke
# Run high priority tests only
testgenius run --priority High
# Run medium priority tests with specific tag
testgenius run --priority Medium --tag regressionđ Browser and Mode Options
Customize browser and execution mode:
# Run in headless mode
testgenius run --headless
# Use specific browser
testgenius run --browser firefox
# Combine options
testgenius run --headless --browser chrome --tag smokeđ Custom Test Directory
Load tests from a custom directory:
# Use custom tests directory
testgenius run --testsDir src/tests
# Combine with file filtering
testgenius run --testsDir src/tests -f src/tests/auth.jsđ¨ Test Examples
đ Authentication Tests
// tests/auth-tests.js
module.exports = [
{
id: "AUTH-001",
name: "User Registration",
priority: "High",
tags: ["registration", "signup"],
site: "https://myapp.com/register",
testData: {
email: "newuser@example.com",
password: "SecurePass123!",
confirmPassword: "SecurePass123!"
},
task: "Fill registration form, submit, verify welcome message"
}
];đ E-commerce Tests
// tests/ecommerce-tests.js
module.exports = [
{
id: "ECOMM-001",
name: "Add to Cart",
priority: "High",
tags: ["cart", "purchase"],
site: "https://shop.example.com",
testData: {
productName: "Test Product",
quantity: "2"
},
task: "Search for product, add to cart, verify cart count increases"
}
];đą Mobile/Responsive Tests
// tests/mobile-tests.js
module.exports = [
{
id: "MOBILE-001",
name: "Mobile Menu Navigation",
priority: "Medium",
tags: ["mobile", "responsive"],
site: "https://example.com",
testData: {},
task: "Open mobile menu, navigate through items, verify smooth transitions"
}
];đ¯ Advanced Features
đ¤ AI-Powered Test Execution
- Smart element detection
- Automatic retry logic
- Intelligent error handling
- Context-aware actions
đ Beautiful Reporting
- HTML reports with screenshots
- Test execution timeline
- Pass/fail statistics
- Performance metrics
đ Allure Reporting (Optional)
TestGenius AI supports Allure for advanced, interactive test reports.
Enable Allure in your config:
// testgenius.config.js
module.exports = {
browser: 'chrome', // chrome, firefox, safari, edge
headless: false, // true for CI/CD
timeout: 30000, // 30 seconds
screenshotOnFailure: true, // Auto-screenshots
reportPath: './reports', // Custom report location
logLevel: 'info', // debug, info, warn, error
reporting: {
outputDir: 'reports',
allure: {
enabled: true, // Enable Allure reporting
resultsDir: 'allure-results',
reportDir: 'allure-report',
attachments: true
}
}
};Or use the CLI flag for one-off runs:
testgenius run --allureView Allure reports:
# Open Allure report in browser
testgenius report --allure
# Serve Allure report on a custom port
testgenius report --allure --serve 8080âšī¸ Allure is optional. If not enabled, TestGenius will generate simple HTML reports by default.
đ§ Flexible Configuration
// testgenius.config.js
module.exports = {
browser: 'chrome', // chrome, firefox, safari, edge
headless: false, // true for CI/CD
timeout: 30000, // 30 seconds
screenshotOnFailure: true, // Auto-screenshots
reportPath: './reports', // Custom report location
logLevel: 'info' // debug, info, warn, error
};đ¨ Troubleshooting
â "Command not found: testgenius"
Solution: Add npm global bin to your PATH
For macOS/Linux:
# Find your npm global path
npm bin -g
# Add to your shell config (~/.zshrc or ~/.bashrc)
export PATH="$PATH:$(npm bin -g)"
# Reload shell
source ~/.zshrc # or source ~/.bashrcFor Windows:
# Add to PATH environment variable
%APPDATA%\npmâ "Test not found"
Check:
- â
Test file is in
tests/directory - â
Export format is correct:
module.exports = [ {...} ] - â Test ID is unique
- â
Run
testgenius listto see all available tests
â "Wrong export format"
â Wrong:
module.exports = {
TEST_1: { id: "TEST-1", ... },
TEST_2: { id: "TEST-2", ... }
};â Correct:
module.exports = [
{ id: "TEST-1", ... },
{ id: "TEST-2", ... }
];đ Success Stories
đ¤ Contributing
We love contributions! Here's how you can help:
- đ Report bugs - Create an issue
- đĄ Suggest features - Start a discussion
- đ Improve docs - Submit a pull request
- â Star the repo - Show your support!
đ Resources
- đ Wiki - Detailed guides and examples
- đĨ Video Tutorials - Step-by-step videos
- đŦ Community - Ask questions and share tips
- đ Issues - Report bugs and request features
đ License
This project is licensed under the MIT License - see the LICENSE file for details.
⥠Powered By
Developed by Hirok Sarker with â¤ī¸ for QA Engineers Worldwide
Ready to revolutionize your testing?
Get Started Now â