Skip to content

vasic-digital/Panoptic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

112 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Panoptic

Panoptic Logo

Go Version License Build Status Coverage Go Report Card

Comprehensive Automated Testing & Recording Framework

A powerful, multi-platform testing solution for web, desktop, and mobile applications with advanced UI automation, screenshot capture, and video recording capabilities.

📋 Table of Contents

🚀 Features

  • Multi-Platform Support: Web, Desktop, and Mobile automation
  • Advanced UI Automation: Element detection and interaction
  • Screenshot Capture: High-quality screenshots with timestamping
  • Video Recording: Session recording with multiple formats
  • Test Framework: Comprehensive testing with assertions
  • Cross-Browser: Chrome, Firefox, Safari, Edge support
  • Mobile Support: iOS and Android automation
  • CI/CD Integration: Easy integration with CI/CD pipelines
  • Extensible Architecture: Plugin system for custom functionality

🏁 Quick Start

# Install Panoptic
go install github.com/your-org/panoptic@latest

# Run your first test
panoptic test example_test.go

# Record a session
panoptic record --output session.mp4

📦 Installation

Prerequisites

  • Go 1.21 or higher
  • Chrome/Chromium (for web automation)
  • Xcode (for iOS automation)
  • Android SDK (for Android automation)

From Source

git clone https://github.com/your-org/panoptic.git
cd panoptic
make install

Using Go

go get github.com/your-org/panoptic

💻 Usage

Basic Test Example

package main

import (
    "github.com/your-org/panoptic"
    "github.com/your-org/panoptic/web"
)

func main() {
    // Create a new browser instance
    browser, _ := web.NewBrowser()
    
    // Navigate to a website
    browser.Navigate("https://example.com")
    
    // Take a screenshot
    browser.Screenshot("screenshot.png")
    
    // Close browser
    browser.Close()
}

Recording a Session

# Record a web session
panoptic record --platform web --url https://example.com --output demo.mp4

# Record a mobile session
panoptic record --platform ios --device iPhone13 --output mobile_demo.mp4

⚙️ Configuration

Panoptic uses a configuration file (panoptic.yaml) for advanced settings:

# panoptic.yaml
browser:
  headless: false
  viewport: "1920x1080"
  timeout: 30s

recording:
  format: "mp4"
  quality: "high"
  fps: 30

mobile:
  ios:
    device: "iPhone13"
    xcode_path: "/Applications/Xcode.app"
  android:
    device: "Pixel_3_API_30"
    adb_path: "/usr/local/bin/adb"

📱 Platform Support

Platform Status Features
Web Full automation, screenshots, recording
iOS App automation, screen recording
Android App automation, screen recording
Desktop UI automation, screen capture

🛠️ Advanced Features

Custom Selectors

// Custom CSS selector
element := browser.FindElement("button.submit")

// XPath selector
element := browser.FindElementByXPath("//button[@type='submit']")

Wait Strategies

// Wait for element to appear
browser.WaitForElement("div.loading", 10*time.Second)

// Wait for condition
browser.WaitForCondition(func() bool {
    return browser.FindElement("button").Visible()
}, 15*time.Second)

Hooks and Plugins

// Before hook
panoptic.AddHook("before_test", func() {
    // Setup code
})

// After hook
panoptic.AddHook("after_test", func() {
    // Cleanup code
})

📖 Examples

Web Testing

func TestLogin(t *testing.T) {
    browser, _ := web.NewBrowser()
    defer browser.Close()
    
    browser.Navigate("https://login.example.com")
    
    // Fill form
    browser.FindElement("#username").Type("testuser")
    browser.FindElement("#password").Type("password123")
    browser.FindElement("button[type='submit']").Click()
    
    // Verify login
    browser.WaitForElement(".dashboard", 10*time.Second)
    
    // Take screenshot
    browser.Screenshot("login_success.png")
}

Mobile Testing

func TestMobileApp(t *testing.T) {
    // Connect to device
    device, _ := mobile.NewDevice("ios")
    defer device.Close()
    
    // Launch app
    device.Launch("com.example.app")
    
    // Interact with elements
    device.Tap("login_button")
    device.Type("username_field", "testuser")
    device.Type("password_field", "password123")
    
    // Verify result
    device.WaitForElement("welcome_screen", 15*time.Second)
}

🧪 Testing

Run the test suite:

# Run all tests
make test

# Run with coverage
make test-coverage

# Run specific test
go test -run TestLogin

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Fork and clone the repository
git clone https://github.com/your-org/panoptic.git
cd panoptic

# Install dependencies
make deps

# Run development server
make dev

Anti-bluff guarantees (round-298)

Panoptic's round-298 deep-doc + Challenge enrichment hardens the following user-visible invariants against the §11.9 anti-bluff anchor (verbatim mandate, 2026-04-29 / reasserted 2026-05-19): "all existing tests and Challenges do work in anti-bluff manner — they MUST confirm that all tested codebase really works as expected!".

Production primitives exercised by the round-298 runner (real code, no mocks beyond CONST-050(A)-permitted unit-test scope):

Package Symbol Round-298 evidence
pkg/i18n Translator, NoopTranslator, SetTranslator, ActiveTranslator, T 5-locale NoopTranslator + registry swap/reset + empty-ID sentinel
internal/config Load, Config.Validate, Config.GetActionsForApp, Action.GetNavigateURL YAML round-trip on 5 locales + negative Validate path
internal/platforms NewPlatformFactory, PlatformFactory.CreatePlatform web + desktop + mobile dispatch + unsupported-type negative
internal/executor TestResult.MarshalJSON ASCII round-trip + KNOWN-ISSUE detector for UTF-8 byte-truncation

5-locale bilingual fixture coverage:

  • en — English (US) baseline ASCII
  • de — German umlauts (äöüß)
  • es — Spanish accents (áéíóúñ)
  • ja — Japanese CJK + ひらがな + カタカナ
  • sr — Serbian Cyrillic (ћирилица љњџ)

Paired-mutation invariant: challenges/panoptic_describe_challenge.sh runs in two modes — clean (exit 0) and --anti-bluff-mutate (exit 99). The mutation plants a deliberate NoopTranslator → NoopTranslatorMUTATED rename in a TMP COPY of the ledger and asserts the gate FAILS, proving the gate actually catches ledger-vs-source drift instead of rubber-stamping it (CONST-035 + §11.4 PASS-bluff guard).

Discovered KNOWN-ISSUE (round-298): the custom fast-JSON marshaller in internal/executor/executor.go::appendJSONString truncates runes to bytes via byte(r), corrupting multi-byte UTF-8 codepoints. The round- 298 runner flags this via the executor-marshal:utf8-detector: regression-present PASS line and emits a KNOWN-ISSUE: log; tracked for future bugfix work. The runner's gate PASSES because the detector itself is an assertion — round-298 surfaces the bug honestly rather than hiding it.

Reproduce locally:

cd panoptic
go build -o /tmp/panoptic_r298_runner ./challenges/runner/
/tmp/panoptic_r298_runner -fixtures ./challenges/fixtures/payloads.json

# Paired-mutation
bash challenges/panoptic_describe_challenge.sh                       # exit 0
bash challenges/panoptic_describe_challenge.sh --anti-bluff-mutate   # exit 99

The round-298 ledger lives at docs/test-coverage.md.

📄 License

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


Star on GitHub Fork on GitHub Watch on GitHub

Made with ❤️ by the Panoptic team

About

A comprehensive tool for automated testing, UI recording, and screenshot capture across web, desktop, and mobile applications.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors