Skip to content

lirany1/quality-automation-hub

Repository files navigation

The Quality Automation Hub πŸ› οΈ

A comprehensive, modern React-based web application that provides essential tools for QA engineers and testers. Built with React, Tailwind CSS, and integrated with Google's Gemini AI for intelligent automation.

React Vite Tailwind CSS License

Quality Automation Hub Banner


πŸ“‘ Table of Contents


🌟 Features

1. AI Test Case Generator πŸ§ͺ

Leverage the power of Google's Gemini AI to automatically generate comprehensive test cases.

  • Generate positive tests, negative tests, edge cases, and boundary tests
  • Just describe your feature and let AI create detailed test scenarios
  • Supports complex feature descriptions
  • Instant results with copy-to-clipboard functionality

Requires: Gemini API key (free tier available)


2. Test Data Generator πŸ“Š

Generate realistic test data instantly with local JavaScript processing.

  • Full names - Random realistic names
  • Email addresses - Valid email formats
  • Phone numbers - Formatted phone numbers
  • Random strings - Customizable length
  • Random numbers - Configurable ranges
  • Dates - Random date generation
  • Physical addresses - Complete addresses
  • Secure passwords - Strong password generation

Features:

  • Customizable output count (1-100 items)
  • Adjustable string length for random text
  • All generation happens locally in your browser (no API needed)
  • Copy all generated data instantly

3. Selector Generator 🎯

Create CSS and XPath selectors with AI assistance or manual construction.

AI-Powered Mode

  • Describe an element in natural language
  • Get both CSS and XPath selectors instantly
  • Perfect for complex element identification

Manual Builder Mode

  • Construct selectors using:
    • Tag name
    • ID
    • Class name
    • Attributes (name, type, etc.)
  • Real-time preview of both CSS and XPath
  • Auto-updates as you type

Perfect for: Web automation, testing, scraping


4. Code Snippet Generator πŸ’»

Generate ready-to-use automation code for popular testing frameworks.

Supported Frameworks:

  • Selenium (Python)
  • Selenium (Java)
  • Playwright (JavaScript)
  • Playwright (Python)
  • Cypress
  • WebdriverIO

Supported Actions:

  • Click element
  • Type text
  • Clear field
  • Get text content
  • Get attribute value
  • Check visibility
  • Check enabled state

Features:

  • Real-time code preview
  • Dynamic input fields based on action
  • Syntax-aware code generation
  • Framework-specific best practices
  • Quick example templates

5. String Utilities πŸ”€

Comprehensive string transformation toolkit with 16+ utilities.

Encoding/Decoding:

  • Base64 encode/decode
  • URL encode/decode
  • HTML escape/unescape

Case Transformations:

  • UPPERCASE
  • lowercase
  • Title Case
  • camelCase
  • snake_case
  • kebab-case

String Operations:

  • Reverse string
  • Trim whitespace
  • Remove all spaces
  • Character count
  • Word count

Special Features:

  • Swap input/output to chain transformations
  • All processing happens locally (privacy-friendly)
  • Instant results

πŸš€ Quick Start

Get up and running in under 2 minutes:

# Clone the repository
git clone https://github.com/lirany1/quality-automation-hub.git

# Navigate to project directory
cd quality-automation-hub

# Install dependencies
npm install

# Start development server
npm run dev

Open your browser and navigate to http://localhost:5173

That's it! πŸŽ‰ The application is now running locally.


πŸ“¦ Installation

Prerequisites

  • Node.js (v14 or higher) - Download here
  • npm or yarn - Comes with Node.js

Step-by-Step Installation

  1. Clone the repository:

    git clone https://github.com/lirany1/quality-automation-hub.git
    cd quality-automation-hub
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Start the development server:

    npm run dev
    # or
    yarn dev
  4. Open in browser: Navigate to the URL shown in your terminal (typically http://localhost:5173)


πŸ“– Usage Guide

Getting Started with Each Tool

πŸ§ͺ AI Test Case Generator

  1. Navigate to "Test Cases" in the sidebar
  2. Enter your Gemini API key (free tier available)
  3. Describe your feature in the text area
  4. Click "Generate Test Cases"
  5. Copy the results using the copy button

Example Input:

User login feature with username and password

πŸ“Š Test Data Generator

  1. Go to "Test Data Gen" in the sidebar
  2. Set the number of items to generate (default: 10)
  3. Click any data type button (Name, Email, Phone, etc.)
  4. Generated data appears instantly
  5. Copy using the copy button

No API key needed - Works completely offline!


🎯 Selector Generator

AI Mode:

  1. Enter your Gemini API key
  2. Describe the element (e.g., "Submit button with blue background")
  3. Get CSS and XPath selectors instantly

Manual Mode:

  1. Enter element details (tag, ID, class, attributes)
  2. Selectors generate automatically as you type
  3. Use for precise control over selector construction

πŸ’» Code Snippet Generator

  1. Select your testing framework (Selenium, Playwright, etc.)
  2. Enter a CSS selector
  3. Choose an action (click, type, etc.)
  4. Enter additional parameters if needed (e.g., text to type)
  5. Code generates automatically
  6. Copy and use in your tests

πŸ”€ String Utilities

  1. Enter or paste your text
  2. Click any transformation button
  3. Result appears instantly
  4. Use "Swap" to chain transformations
  5. Copy the final result

Example Workflow:

  1. Paste text
  2. Click "lowercase"
  3. Click "Swap" to move result to input
  4. Click "snake_case"
  5. Copy final result

πŸ—οΈ Architecture

Component Hierarchy

App.jsx (Root + Router)
β”œβ”€β”€ Sidebar.jsx (Fixed Navigation)
β”‚   └── NavLink Components
β”‚
└── Routes (Main Content Area)
    β”œβ”€β”€ Dashboard.jsx
    β”‚   └── ToolCard.jsx Γ— 5
    β”‚
    β”œβ”€β”€ AiTestCaseGenerator.jsx
    β”‚   β”œβ”€β”€ Input Fields
    β”‚   └── OutputBox β†’ CopyButton
    β”‚
    β”œβ”€β”€ TestDataGenerator.jsx
    β”‚   β”œβ”€β”€ Control Panel
    β”‚   └── Output + CopyButton
    β”‚
    β”œβ”€β”€ SelectorGenerator.jsx
    β”‚   β”œβ”€β”€ AI Section (with useGemini hook)
    β”‚   β”‚   └── OutputBox Γ— 2 (CSS + XPath)
    β”‚   └── Manual Section
    β”‚       └── OutputBox Γ— 2 (CSS + XPath)
    β”‚
    β”œβ”€β”€ CodeSnippetGenerator.jsx
    β”‚   β”œβ”€β”€ Framework Selector
    β”‚   β”œβ”€β”€ Action Selector
    β”‚   └── Code Output + CopyButton
    β”‚
    └── StringUtilities.jsx
        β”œβ”€β”€ Input Textarea
        β”œβ”€β”€ Utility Buttons Γ— 16
        └── Output + CopyButton

Data Flow

AI-Powered Tools Flow

User Input β†’ Component State β†’ useGemini Hook β†’ Gemini API
                                                      ↓
Component State ← Parse Response ← API Response β†β”€β”€β”€β”€β”˜
       ↓
OutputBox Component β†’ CopyButton

Local Processing Tools Flow

User Input β†’ Component State β†’ useEffect / Button Handler
                                        ↓
                              Local JS Function
                                        ↓
                              setState(output)
                                        ↓
                              Display + CopyButton

Routing Structure

/                   β†’ Dashboard (Homepage)
/test-cases         β†’ AI Test Case Generator
/test-data          β†’ Test Data Generator
/selectors          β†’ Selector Generator (AI + Manual)
/code-snippets      β†’ Code Snippet Generator
/string-utils       β†’ String Utilities

🎨 Tech Stack

Core Technologies

Technology Version Purpose
React 18.x UI framework with functional components and hooks
React Router 6.x Client-side routing and navigation
Tailwind CSS 3.x Utility-first CSS styling
Vite 5.x Fast build tool and development server
Gemini AI 2.5-flash AI-powered features

Key Dependencies

{
  "react": "^18.3.1",
  "react-dom": "^18.3.1",
  "react-router-dom": "^6.26.2",
  "tailwindcss": "^3.4.1",
  "vite": "^5.4.2"
}

Development Principles

  • βœ… Functional components with React Hooks
  • βœ… Component-based architecture
  • βœ… Clean separation of concerns
  • βœ… Reusable components and hooks
  • βœ… Modern ES6+ JavaScript
  • βœ… Utility-first CSS with Tailwind

πŸ“ Project Structure

quality-automation-hub/
β”œβ”€β”€ public/                      # Static assets
β”‚   └── vite.svg
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/              # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx         # Fixed navigation sidebar
β”‚   β”‚   β”œβ”€β”€ ToolCard.jsx        # Dashboard tool cards
β”‚   β”‚   β”œβ”€β”€ OutputBox.jsx       # Consistent output display
β”‚   β”‚   β”œβ”€β”€ CopyButton.jsx      # Smart copy-to-clipboard
β”‚   β”‚   └── index.js            # Component exports
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/                   # Route components
β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx       # Homepage with tool overview
β”‚   β”‚   β”œβ”€β”€ AiTestCaseGenerator.jsx
β”‚   β”‚   β”œβ”€β”€ TestDataGenerator.jsx
β”‚   β”‚   β”œβ”€β”€ SelectorGenerator.jsx
β”‚   β”‚   β”œβ”€β”€ CodeSnippetGenerator.jsx
β”‚   β”‚   β”œβ”€β”€ StringUtilities.jsx
β”‚   β”‚   └── index.js            # Page exports
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks/                   # Custom React hooks
β”‚   β”‚   └── useGemini.js        # Gemini API integration
β”‚   β”‚
β”‚   β”œβ”€β”€ services/                # API and business logic
β”‚   β”‚
β”‚   β”œβ”€β”€ App.jsx                  # Main app with router
β”‚   β”œβ”€β”€ main.jsx                 # React entry point
β”‚   └── index.css                # Global styles + Tailwind
β”‚
β”œβ”€β”€ .gitignore                   # Git ignore rules
β”œβ”€β”€ package.json                 # Dependencies and scripts
β”œβ”€β”€ vite.config.js              # Vite configuration
β”œβ”€β”€ tailwind.config.js          # Tailwind configuration
β”œβ”€β”€ postcss.config.js           # PostCSS configuration
β”œβ”€β”€ eslint.config.js            # ESLint configuration
β”œβ”€β”€ index.html                  # HTML template
β”‚
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ ARCHITECTURE.md             # Detailed architecture docs
β”œβ”€β”€ PROJECT_SUMMARY.md          # Project overview
β”œβ”€β”€ QUICKSTART.md              # Quick start guide
└── CHECKLIST.md               # Implementation checklist

πŸ”‘ API Integration

Gemini AI Setup

For AI-powered features (Test Case Generator and AI Selector Generator), you'll need a free Gemini API key.

Getting Your API Key

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the generated key

Using Your API Key

  1. Navigate to any AI-powered tool
  2. Paste your API key in the "API Key" input field
  3. The key is stored only in memory for the current session
  4. Your key is never saved or logged - privacy guaranteed

API Features

Model Used: gemini-2.5-flash-preview-09-2025

Built-in Features:

  • βœ… Exponential backoff retry mechanism (3 retries)
  • βœ… Rate limit handling (429 errors)
  • βœ… Server error recovery (5xx errors)
  • βœ… Loading state indicators
  • βœ… Comprehensive error messages

Free Tier Limits:

  • 60 requests per minute
  • 1,500 requests per day

πŸ› οΈ Development

Available Scripts

# Start development server with hot reload
npm run dev

# Build for production
npm run build

# Preview production build locally
npm run preview

# Run ESLint
npm run lint

Development Workflow

  1. Make changes to source files
  2. Hot Module Replacement automatically reloads
  3. Test in browser at http://localhost:5173
  4. Build when ready with npm run build
  5. Preview production build with npm run preview

Component Development

All components follow these patterns:

Functional Components:

import { useState, useEffect } from 'react';

function MyComponent() {
  const [state, setState] = useState('');
  
  useEffect(() => {
    // Side effects
  }, [dependencies]);
  
  return (
    <div className="tailwind-classes">
      {/* JSX */}
    </div>
  );
}

export default MyComponent;

Custom Hooks:

import { useState } from 'react';

export function useCustomHook() {
  const [data, setData] = useState(null);
  
  const doSomething = async () => {
    // Logic
  };
  
  return { data, doSomething };
}

Styling Guidelines

This project uses Tailwind CSS exclusively. No custom CSS classes.

Color Scheme:

  • Background: bg-gray-900, bg-gray-800
  • Text: text-gray-200, text-gray-400
  • Primary: bg-blue-600, hover:bg-blue-700
  • Success: text-green-500
  • Error: text-red-500

Common Patterns:

// Card
<div className="bg-gray-800 rounded-lg p-6">

// Button
<button className="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg">

// Input
<input className="w-full bg-gray-700 text-gray-200 p-3 rounded-lg" />

πŸ—οΈ Building for Production

Production Build

npm run build

This creates an optimized production build in the dist/ directory.

Build includes:

  • βœ… Minified JavaScript
  • βœ… Optimized CSS (Tailwind purged)
  • βœ… Asset optimization
  • βœ… Code splitting
  • βœ… Tree shaking

Preview Production Build

npm run preview

Test the production build locally before deployment.

Deployment

The dist/ folder can be deployed to any static hosting service:

  • Vercel - vercel deploy
  • Netlify - Drag and drop dist/ folder
  • GitHub Pages - Push dist/ to gh-pages branch
  • Firebase Hosting - firebase deploy
  • AWS S3 - Upload dist/ contents

Environment Variables

For production, you may want to add environment variables:

# .env.production
VITE_APP_NAME=Quality Automation Hub
VITE_API_ENDPOINT=your-endpoint

Access in code:

const appName = import.meta.env.VITE_APP_NAME;

🌐 Browser Support

This application works on all modern browsers:

Browser Minimum Version
Chrome 90+
Edge 90+
Firefox 88+
Safari 14+
Opera 76+

Recommended: Chrome or Edge for best performance

Features used:

  • ES6+ JavaScript
  • CSS Grid & Flexbox
  • Fetch API
  • Clipboard API (with fallback)

🀝 Contributing

Contributions are welcome! Here's how you can help:

Reporting Bugs

  1. Check if the issue already exists
  2. Create a new issue with:
    • Clear title
    • Steps to reproduce
    • Expected vs actual behavior
    • Screenshots if applicable

Suggesting Features

  1. Create an issue labeled "enhancement"
  2. Describe the feature and use case
  3. Explain why it would be valuable

Pull Requests

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Make your changes
  4. Test thoroughly
  5. Commit with clear messages (git commit -m 'Add AmazingFeature')
  6. Push to branch (git push origin feature/AmazingFeature)
  7. Open a Pull Request

Code Guidelines

  • Use functional components and hooks
  • Follow existing code style
  • Use Tailwind CSS for styling
  • Add comments for complex logic
  • Keep components focused and small

πŸ’‘ Future Enhancements

Planned Features

  • Dark/Light Mode Toggle - User preference support
  • API Response Validator - JSON/XML validation and formatting
  • SQL Query Generator - AI-powered SQL generation
  • Test Report Generator - Export test results
  • Screenshot Comparison - Visual regression testing
  • Performance Testing Utilities - Load time analysis
  • Local Storage - Save API keys (optional)
  • Export Functionality - Download test cases to file
  • More Frameworks - Support for additional testing tools
  • Code Syntax Highlighting - Enhanced code display
  • User Preferences - Save tool settings
  • Keyboard Shortcuts - Power user features
  • Mobile Responsive - Enhanced mobile experience
  • PWA Support - Install as app
  • Multi-language Support - i18n integration

Community Requests

Have an idea? Create an issue and let's discuss!


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

What this means:

  • βœ… Free to use
  • βœ… Free to modify
  • βœ… Free to distribute
  • βœ… Commercial use allowed
  • βœ… No warranty provided

πŸ™ Acknowledgments

Technologies

  • React - A JavaScript library for building user interfaces
  • Vite - Next generation frontend tooling
  • Tailwind CSS - A utility-first CSS framework
  • Google Gemini - AI-powered features

Inspiration

Built with ❀️ for QA engineers and testers who want to automate repetitive tasks and focus on what matters most.

Contributors

Thanks to all contributors who have helped improve this project!


πŸ“ž Support


⭐ Show Your Support

If you find this project helpful, please consider:

  • Starring the repository ⭐
  • Sharing with your team
  • Contributing improvements
  • Reporting bugs
  • Suggesting features
  • Buying me a coffee β˜•

Buy Me A Coffee


Built with ❀️ for QA Engineers

Report Bug Β· Request Feature

Made with React, Tailwind CSS, and lots of β˜•