Team Ai
Apppublic

riazmo/ui-regression-testing-2

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
App README

UI Regression Testing System - Hugging Face Spaces

A powerful automated system for detecting visual regressions by comparing Figma designs with live website screenshots.

๐ŸŽฏ Features

  • โ€”โœ… Automated Figma Screenshot Capture - Extracts design frames at correct dimensions
  • โ€”โœ… Website Screenshot Capture - Captures desktop and mobile views
  • โ€”โœ… Visual Difference Detection - AI-powered comparison using vision models
  • โ€”โœ… Annotated Comparisons - Red/orange/green circles marking differences
  • โ€”โœ… Severity Classification - High/Medium/Low severity ratings
  • โ€”โœ… Detailed Reports - Comprehensive regression analysis
  • โ€”โœ… Similarity Scoring - 0-100 score indicating design-to-website match

๐Ÿš€ Quick Start

1. Get Your Credentials

Figma API Key:

  • โ€”Go to https://www.figma.com/developers/api#access-tokens
  • โ€”Create a new personal access token
  • โ€”Copy the token (starts with figd_)

Figma File ID:

  • โ€”Open your Figma file
  • โ€”The URL looks like: https://www.figma.com/file/{FILE_ID}/...
  • โ€”Copy the FILE_ID part

Website URL:

  • โ€”The full URL of your website (e.g., https://example.com)
  • โ€”Must be publicly accessible

Hugging Face Token (Optional):

  • โ€”Go to https://huggingface.co/settings/tokens
  • โ€”Create a new token with read access

2. Run the Test

  1. 1.Fill in your credentials in the UI
  2. 2.Click "Start Regression Test"
  3. 3.Wait for the test to complete (1-3 minutes)
  4. 4.Review results, comparison images, and detailed report

๐Ÿ” How It Works

This project uses an advanced multi-agent workflow powered by LangGraph.

Agent 0: Super Agent

  • โ€”Generates comprehensive test plan

Agent 1: Design Inspector

  • โ€”Captures Figma frames at correct dimensions

Agent 2: Website Inspector

  • โ€”Screenshots website at multiple viewports

Agent 3: Integrated Analyzer

  • โ€”Compares screenshots using both pixel analysis and HF Vision models.

Human-in-the-loop

  • โ€”The workflow pauses before the final analysis, allowing you to review the captured screenshots and approve continuing.

๐Ÿ› ๏ธ Technical Details

Key Technologies

  • โ€”LangGraph: Multi-agent orchestration
  • โ€”Gradio: Web UI
  • โ€”Playwright: Browser automation
  • โ€”Pillow: Image processing
  • โ€”Hugging Face Transformers: Vision models

๐Ÿ“š Documentation

For more information on the advanced LangGraph features, please see `README_LANGGRAPH.md`.


Built with โค๏ธ for better UI quality assurance