Skip to content

MadnessEngineering/Tinker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Tinker

A Madness engineered browser built for tinkerers and test enthusiasts. Tinker treats web testing as a craft, combining precision mechanics with MQTT-based event handling to create the ultimate testing workbench.

The Blueprint

Born in a workshop of web innovation, Tinker aims to reimagine browser testing through ingenious engineering. By building testing capabilities directly into the browser's machinery, we provide craftspeople with the tools they need for reliable, observable, and controllable web testing.

Workshop Tools

  • πŸ”§ MQTT-powered Control Mechanisms
  • πŸ› οΈ Universal Workbench API as primary interface
  • πŸ“Š Built-in Diagnostic Dashboard
  • πŸ” Test Blueprint Management, Pluginable
  • πŸ”„ Customizable Session Versioning and Comparison
  • πŸ”„ Reproducible Testing Patterns and replay tooling
  • 🎯 Precision Event Engineering
  • 🌐 Network Traffic Analysis & Monitoring
  • 🎨 Visual Testing & Screenshot Comparison
  • 🧩 DOM Element Inspector & Interaction
  • ⚑ JavaScript Injection & Execution

Machine Architecture

Core Machinery

  1. Browser Engine Room

    • Custom WebView Forge βœ…
    • Event Capture & Replay Mechanisms βœ…
    • MQTT Control Panel Integration βœ…
  2. Testing Workbench

    • Remote Control Interface βœ…
    • Test Assembly Line βœ…
    • Quality Assurance Tools βœ…
    • Visual Inspection System βœ…
  3. Event Workshop

    • MQTT Signal Tower βœ…
    • Event Blueprint System βœ…
    • Replay Engineering βœ…
    • Timing Calibration Tools
  4. Advanced Testing Laboratory πŸ†•

    • DOM Element Inspector βœ…
    • JavaScript Injection Engine βœ…
    • Network Traffic Monitor βœ…
    • Visual Testing Suite βœ…
    • Performance Analyzer 🚧
    • Debug Tools & Breakpoints 🚧

Quick Start

  • πŸ”§ Clone the repository
  • πŸ› οΈ Run cargo build
  • πŸš€ Start with cargo run -- --url https://example.com
  • 🌐 Start with API: cargo run -- --api (runs on http://127.0.0.1:3003)

See Getting Started Guide for detailed setup.

API Endpoints

Tinker provides a comprehensive REST API for automation and testing:

Core Browser Control

  • POST /api/navigate - Navigate to URL
  • POST /api/tabs - Create new tab
  • DELETE /api/tabs/{id} - Close tab
  • POST /api/tabs/{id}/activate - Switch to tab

Visual Testing

  • POST /api/screenshot - Capture screenshot
  • POST /api/visual/baseline - Create visual baseline
  • POST /api/visual/test - Run visual regression test

DOM Inspection & Interaction

  • POST /api/element/find - Find elements with CSS/XPath/text selectors
  • POST /api/element/interact - Click, type, hover, scroll elements
  • POST /api/element/highlight - Highlight elements for debugging
  • POST /api/element/wait - Wait for element conditions
  • POST /api/javascript/execute - Execute JavaScript in page
  • GET /api/page/info - Extract page information

Network Monitoring

  • POST /api/network/start - Start network monitoring
  • POST /api/network/stop - Stop network monitoring
  • GET /api/network/stats - Get network statistics
  • GET /api/network/export - Export HAR file
  • POST /api/network/filter - Add network filters
  • POST /api/network/clear-filters - Clear all filters

Real-time Control

  • WS /ws - WebSocket for real-time events and control

Documentation

Project Status

πŸŽ‰ WORLD-CLASS BROWSER TESTING PLATFORM - Major phases complete!

βœ… Phase 1: Foundation (COMPLETE)

  • Core Engine: Window & WebView creation with proper bounds
  • Tab Management: Complete system with thread-safe state handling
  • MQTT Events: Full implementation with reconnection logic
  • CLI Interface: Comprehensive argument parsing and configuration
  • Build System: Compiles successfully and starts properly

βœ… Phase 2: Visual Testing (COMPLETE)

  • Screenshot Capture: Multi-format support (PNG, JPEG, WebP)
  • Visual Comparison: Pixel-level difference analysis
  • Baseline Testing: Create and compare against visual baselines
  • Image Processing: Full pipeline for visual regression testing

βœ… Phase 3: Advanced DOM & Network (COMPLETE)

  • DOM Element Inspector: CSS/XPath/text selector support
  • Element Interaction: Click, type, hover, scroll, drag operations
  • JavaScript Injection: Full script execution capabilities
  • Wait Conditions: Smart waiting for dynamic content
  • Network Monitoring: Real-time request/response tracking
  • HAR Export: Industry-standard network analysis format
  • Performance Statistics: Request timing and analysis

🚧 Phase 4: Performance & Debugging (IN PROGRESS)

  • Performance Metrics: Page load timing, resource analysis
  • Memory Profiling: JavaScript heap and DOM analysis
  • Step-through Debugging: Breakpoints and code inspection
  • CPU Performance: JavaScript execution profiling

πŸ”§ Quick Start Status

  • cargo build βœ… Works perfectly
  • cargo run -- --url https://example.com βœ… BROWSER FULLY FUNCTIONAL!
  • cargo run -- --api βœ… REST API SERVER READY!
  • Window creation βœ… Works with proper chrome
  • Tab management βœ… Works with visual tab bar
  • MQTT events βœ… Works with full event publishing
  • WebView integration βœ… Both content view and tab bar working
  • DOM inspection βœ… Complete automation capabilities
  • Network monitoring βœ… Real-time traffic analysis
  • Visual testing βœ… Screenshot & comparison engine

Testing Scripts

Use the included Python test scripts to verify functionality:

# Test DOM inspection and JavaScript injection
python test_dom_simple.py

# Test network monitoring features  
python test_network_monitoring.py

# Test visual testing capabilities
python test_visual.py

What's Next

Immediate Priorities (Phase 4)

  1. Performance Analyzer: JavaScript execution profiling, memory usage tracking
  2. Debug Tools: Step-through debugging, breakpoint management
  3. Advanced Metrics: Core Web Vitals, custom performance markers

Future Enhancements

  • Browser DevTools integration
  • Multi-browser support (Firefox, Safari engines)
  • Cloud testing infrastructure
  • Plugin system for custom testing tools

Capabilities Summary

🎯 Element Automation: Find, interact, and wait for DOM elements 🌐 Network Analysis: Monitor, filter, and export network traffic
πŸ“Έ Visual Testing: Screenshot capture and visual regression testing ⚑ JavaScript Control: Execute custom scripts and monitor execution πŸ”„ Event Streaming: Real-time MQTT event publishing 🌍 Web Automation: Complete browser control via REST API πŸ“Š Performance Monitoring: Request timing and resource analysis πŸ”§ Debugging Tools: Element highlighting and inspection

Tinker is now a production-ready browser testing platform!

License

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

About

Madness engineered browser built in Rust for tinkerers and test enthusiasts.

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published