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.
- Features
- Quick Start
- Installation
- Usage
- Configuration
- Platform Support
- Advanced Features
- Examples
- Testing
- Contributing
- License
- 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
# 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- Go 1.21 or higher
- Chrome/Chromium (for web automation)
- Xcode (for iOS automation)
- Android SDK (for Android automation)
git clone https://github.com/your-org/panoptic.git
cd panoptic
make installgo get github.com/your-org/panopticpackage 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()
}# 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.mp4Panoptic 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 | Status | Features |
|---|---|---|
| Web | β | Full automation, screenshots, recording |
| iOS | β | App automation, screen recording |
| Android | β | App automation, screen recording |
| Desktop | β | UI automation, screen capture |
// Custom CSS selector
element := browser.FindElement("button.submit")
// XPath selector
element := browser.FindElementByXPath("//button[@type='submit']")// 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)// Before hook
panoptic.AddHook("before_test", func() {
// Setup code
})
// After hook
panoptic.AddHook("after_test", func() {
// Cleanup code
})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")
}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)
}Run the test suite:
# Run all tests
make test
# Run with coverage
make test-coverage
# Run specific test
go test -run TestLoginWe welcome contributions! Please see our Contributing Guide for details.
# Fork and clone the repository
git clone https://github.com/your-org/panoptic.git
cd panoptic
# Install dependencies
make deps
# Run development server
make devThis project is licensed under the MIT License - see the LICENSE file for details.
