📊 Regression Tester Pro

🔧 Access Platform

🚀 Launch RTP Platform

Full-stack testing template and instance management platform

Overview

Regression Tester Pro (RTP) is a comprehensive full-stack testing instance management platform that standardizes test case creation across teams. Built with Next.js 14 and Node.js, it provides dynamic testing template creation, systematic test execution tracking, and integrated file attachment management.

🎯 Core Platform Features

🔧 Updated Terminology


🏗️ Technical Architecture

Technology Stack

Component Technology Purpose
Frontend Next.js 14 + TypeScript Modern React framework with SSR
UI Framework Tailwind CSS + shadcn/ui Consistent design system and components
Backend Node.js + Express RESTful API server
Database PostgreSQL 16 Relational data with Alpine Linux compatibility
ORM Prisma Type-safe database access and migrations
Storage MinIO S3-compatible object storage for attachments
Authentication Authelia Integration Enterprise-grade authentication and authorization
Deployment Docker + Traefik Containerized microservices with SSL

Microservices Architecture

Frontend Service (Next.js Standalone)

rtp-frontend:
  build: ./regression-tester-pro/frontend
  container_name: rtp-frontend
  restart: unless-stopped
  networks:
    - services-network
  depends_on:
    - rtp-backend
  labels:
    - traefik.http.routers.rtp.rule=Host(`rtp.playtopia.com.au`)
    - traefik.http.routers.rtp.middlewares=authelia-auth
    - traefik.http.services.rtp.loadbalancer.server.port=3000

Backend API Service

rtp-backend:
  build: ./regression-tester-pro/backend  
  container_name: rtp-backend
  restart: unless-stopped
  networks:
    - services-network
  depends_on:
    - rtp-database
    - rtp-storage
  environment:
    - DATABASE_URL=postgresql://rtp_user:rtp_password@rtp-database:5432/rtp_db
    - MINIO_ENDPOINT=rtp-storage:9000

Database Service (PostgreSQL 16)

rtp-database:
  image: postgres:16-alpine
  container_name: rtp-database
  restart: unless-stopped
  environment:
    - POSTGRES_DB=rtp_db
    - POSTGRES_USER=rtp_user  
    - POSTGRES_PASSWORD=rtp_password
  volumes:
    - rtp_postgres_data:/var/lib/postgresql/data

Storage Service (MinIO)

rtp-storage:
  image: minio/minio:latest
  container_name: rtp-storage
  restart: unless-stopped
  command: server /data --console-address ":9001"
  environment:
    - MINIO_ROOT_USER=rtp_minio_access
    - MINIO_ROOT_PASSWORD=rtp_minio_secret
  volumes:
    - rtp_minio_data:/data

Database Schema Architecture

Core Tables

-- User management with Authelia integration
CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    email VARCHAR(255) UNIQUE NOT NULL,
    name VARCHAR(255) NOT NULL,
    role user_role NOT NULL DEFAULT 'USER',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Reusable testing template definitions
CREATE TABLE form_templates (
    id SERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    description TEXT,
    category VARCHAR(100),
    created_by INTEGER REFERENCES users(id),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Dynamic field definitions with multiple types
CREATE TABLE form_fields (
    id SERIAL PRIMARY KEY,
    template_id INTEGER REFERENCES form_templates(id) ON DELETE CASCADE,
    name VARCHAR(255) NOT NULL,
    label VARCHAR(255) NOT NULL,
    type field_type NOT NULL,
    required BOOLEAN DEFAULT false,
    placeholder TEXT,
    help_text TEXT,
    options TEXT[], -- For checkbox, radio, select fields
    order_index INTEGER DEFAULT 0
);

-- Individual testing instances  
CREATE TABLE test_scenarios (
    id SERIAL PRIMARY KEY,
    title VARCHAR(255) NOT NULL,
    description TEXT,
    template_id INTEGER REFERENCES form_templates(id),
    status scenario_status DEFAULT 'DRAFT',
    priority scenario_priority DEFAULT 'MEDIUM',
    category VARCHAR(100),
    assigned_to INTEGER REFERENCES users(id),
    created_by INTEGER REFERENCES users(id),
    due_date TIMESTAMP,
    notes TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Step-by-step test execution tracking
CREATE TABLE test_steps (
    id SERIAL PRIMARY KEY,
    scenario_id INTEGER REFERENCES test_scenarios(id) ON DELETE CASCADE,
    step_order INTEGER NOT NULL,
    step_description TEXT NOT NULL,
    expected_result TEXT NOT NULL,
    actual_result TEXT,
    status step_status DEFAULT 'PENDING',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Tag system for organization
CREATE TABLE tags (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100) UNIQUE NOT NULL,
    color VARCHAR(7) DEFAULT '#3B82F6',
    description TEXT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- File attachment management
CREATE TABLE attachments (
    id SERIAL PRIMARY KEY,
    filename VARCHAR(255) NOT NULL,
    original_name VARCHAR(255) NOT NULL,
    mime_type VARCHAR(100),
    size_bytes INTEGER,
    minio_path VARCHAR(500) NOT NULL,
    scenario_id INTEGER REFERENCES test_scenarios(id),
    uploaded_by INTEGER REFERENCES users(id),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

File Structure

/home/thrax/unified-services/regression-tester-pro/
├── README.md                      # Project documentation
├── docker-compose.yml             # Legacy standalone config (integrated into main)
├── frontend/                      # Next.js 14 application
│   ├── Dockerfile                 # Node.js standalone deployment
│   ├── package.json               # Dependencies with all required packages
│   ├── next.config.js             # Next.js configuration (standalone mode)
│   ├── tailwind.config.js         # Tailwind CSS configuration
│   ├── tsconfig.json              # TypeScript configuration
│   ├── app/                       # Next.js 14 App Router
│   │   ├── globals.css            # Global styles
│   │   ├── layout.tsx             # Root layout component
│   │   ├── page.tsx               # Dashboard with testing templates/instances
│   │   ├── templates/
│   │   │   ├── page.tsx           # Testing template listing
│   │   │   └── new/page.tsx       # Testing template creation
│   │   ├── scenarios/             # Testing instances (renamed from scenarios)
│   │   │   ├── page.tsx           # Testing instance listing
│   │   │   ├── new/page.tsx       # Testing instance creation
│   │   │   └── [id]/
│   │   │       ├── page.tsx       # Testing instance detail view
│   │   │       └── edit/page.tsx  # Testing instance editing
│   │   └── tags/
│   │       └── page.tsx           # Tag management with CRUD operations
│   ├── components/
│   │   ├── ui/                    # shadcn/ui components
│   │   │   ├── button.tsx
│   │   │   ├── card.tsx
│   │   │   ├── input.tsx
│   │   │   ├── textarea.tsx
│   │   │   ├── select.tsx
│   │   │   ├── badge.tsx
│   │   │   └── separator.tsx      # Radix UI separator component
│   │   └── forms/
│   │       └── file-upload.tsx    # Advanced file upload component
│   └── lib/
│       └── utils.ts               # Utility functions
├── backend/                       # Node.js API server
│   ├── Dockerfile                 # Node.js 20 Alpine with Prisma compatibility
│   ├── package.json               # Backend dependencies
│   ├── src/
│   │   ├── server.js              # Express application setup
│   │   └── routes/
│   │       ├── templates.js       # Testing template CRUD operations
│   │       ├── scenarios.js       # Testing instance management
│   │       ├── attachments.js     # File upload and MinIO integration
│   │       ├── tags.js            # Tag management endpoints
│   │       └── auth.js            # Authelia integration
│   └── prisma/
│       ├── schema.prisma          # Database schema with correct binary targets
│       └── seed.js                # Database seeding with sample data

🔧 Advanced Features

Dynamic Testing Template Builder

Field Type System

const FIELD_TYPES = [
  { value: 'TEXT', label: 'Text Input' },
  { value: 'TEXTAREA', label: 'Text Area' },
  { value: 'EMAIL', label: 'Email' },
  { value: 'NUMBER', label: 'Number' },
  { value: 'DATE', label: 'Date' },
  { value: 'SELECT', label: 'Dropdown' },
  { value: 'CHECKBOX', label: 'Checkbox' }, // Fixed multi-line options
  { value: 'RADIO', label: 'Radio Buttons' },
  { value: 'FILE', label: 'File Upload' },
  { value: 'RICH_TEXT', label: 'Rich Text Editor' }
];

Enhanced Checkbox/Radio Options

Fixed multi-line option support with proper textarea handling:

<Textarea
  value={field.options?.join('\n') || ''}
  onChange={(e) => updateField(field.id, { 
    options: e.target.value.split('\n').filter(o => o.trim()) 
  })}
  placeholder="Option 1\nOption 2\nOption 3"
  rows={4}
  className="resize-vertical"
  style={{ whiteSpace: 'pre-wrap' }}
/>

Testing Instance Management

Comprehensive Step Tracking

// Test step management with status tracking
interface TestStep {
  id: string;
  step: string;                    // Action to perform
  expectedResult: string;          // Expected outcome
  actualResult?: string;           // Recorded results
  status: 'PENDING' | 'PASSED' | 'FAILED' | 'SKIPPED';
}

// Step execution workflow
const processTestStep = (step, actualResult) => {
  const status = evaluateStepResult(step.expectedResult, actualResult);
  return {
    ...step,
    actualResult,
    status,
    executedAt: new Date().toISOString()
  };
};

Status Management System

const STATUS_OPTIONS = [
  { value: 'DRAFT', label: 'Draft' },
  { value: 'PENDING_REVIEW', label: 'Pending Review' },
  { value: 'APPROVED', label: 'Approved' },
  { value: 'IN_TESTING', label: 'In Testing' },
  { value: 'COMPLETED', label: 'Completed' },
  { value: 'FAILED', label: 'Failed' },
  { value: 'ARCHIVED', label: 'Archived' }
];

const PRIORITY_OPTIONS = [
  { value: 'LOW', label: 'Low' },
  { value: 'MEDIUM', label: 'Medium' },
  { value: 'HIGH', label: 'High' },
  { value: 'CRITICAL', label: 'Critical' }
];

Tag Management System

Visual Tag Management

// Tag system with visual color management
interface Tag {
  id: string;
  name: string;
  color: string;              // Hex color for visual organization
  description?: string;       // Optional tag description
  usageCount: number;         // Track tag usage across instances
  createdAt: string;
}

// Predefined color palette for tags
const PRESET_COLORS = [
  '#3B82F6', '#10B981', '#F59E0B', '#EF4444', 
  '#8B5CF6', '#06B6D4', '#84CC16', '#F97316',
  '#EC4899', '#6B7280', '#14B8A6', '#F472B6'
];

Tag CRUD Operations


🚀 Deployment & Performance

Docker Integration

RTP is fully integrated into the main unified-services docker-compose.yml:

# Complete RTP service stack
services:
  rtp-frontend:
    build: ./regression-tester-pro/frontend
    container_name: rtp-frontend
    restart: unless-stopped
    networks:
      - services-network
    depends_on:
      - rtp-backend
    labels:
      - traefik.enable=true
      - traefik.http.routers.rtp.rule=Host(`rtp.playtopia.com.au`)
      - traefik.http.routers.rtp.entrypoints=websecure
      - traefik.http.routers.rtp.tls.certresolver=letsencrypt
      - traefik.http.routers.rtp.middlewares=authelia-auth
      - traefik.http.services.rtp.loadbalancer.server.port=3000

  rtp-backend:
    build: ./regression-tester-pro/backend
    container_name: rtp-backend
    restart: unless-stopped
    networks:
      - services-network
    depends_on:
      - rtp-database
      - rtp-storage
    environment:
      - DATABASE_URL=postgresql://rtp_user:rtp_password@rtp-database:5432/rtp_db
      - MINIO_ENDPOINT=rtp-storage:9000
      - JWT_SECRET=your-super-secret-jwt-key
      - AUTHELIA_URL=http://authelia:9091
      - NODE_ENV=production

  rtp-database:
    image: postgres:16-alpine
    container_name: rtp-database
    restart: unless-stopped
    networks:
      - services-network
    environment:
      - POSTGRES_DB=rtp_db
      - POSTGRES_USER=rtp_user
      - POSTGRES_PASSWORD=rtp_password
    volumes:
      - rtp_postgres_data:/var/lib/postgresql/data

  rtp-storage:
    image: minio/minio:latest
    container_name: rtp-storage
    restart: unless-stopped
    networks:
      - services-network
    command: server /data --console-address ":9001"
    environment:
      - MINIO_ROOT_USER=rtp_minio_access
      - MINIO_ROOT_PASSWORD=rtp_minio_secret
    volumes:
      - rtp_minio_data:/data

volumes:
  rtp_postgres_data:
  rtp_minio_data:

Authentication Integration

Authelia Forward Auth

// Backend authentication middleware
const authenticateUser = async (req, res, next) => {
  const userEmail = req.headers['remote-user'];
  const userName = req.headers['remote-name'];
  const userGroups = req.headers['remote-groups'];
  
  if (!userEmail) {
    return res.status(401).json({ error: 'Authentication required' });
  }
  
  // Map Authelia groups to RTP roles
  const role = mapGroupsToRole(userGroups);
  
  // Create or update user record
  const user = await upsertUser({
    email: userEmail,
    name: userName,
    role: role
  });
  
  req.user = user;
  next();
};

const mapGroupsToRole = (groups) => {
  if (groups.includes('admin')) return 'ADMIN';
  if (groups.includes('family')) return 'MANAGER';
  return 'USER';
};

Performance Optimizations


📊 Development Status

Production Ready Features

🔧 Technical Achievements

📊 Production Status: FULLY OPERATIONAL

RTP delivers an enterprise-grade testing management platform with:

Regression Tester Pro represents a complete testing management solution that standardizes and streamlines the entire testing lifecycle from template creation to execution tracking and results management.