diff --git a/README.md b/README.md index f99f863..f63cad6 100644 --- a/README.md +++ b/README.md @@ -1,86 +1,197 @@ # ๐Ÿงช TestPilot -**Intelligent Bug Detection & Telemetry Extension for Modern Web Apps** - -TestPilot is a powerful, production-grade Chrome extension designed to catch bugs before your users do. It acts as a black-box flight recorder for your web application, capturing console errors, network failures, slow APIs, performance metrics, and security risks in real-time. - -![TestPilot Banner](https://via.placeholder.com/800x200?text=TestPilot+Extension) - -## โœจ Key Features - -- **๐Ÿš€ Real-time Telemetry**: Captures `console.error`, `console.warn`, unhandled exceptions, and promise rejections. -- **๐ŸŒ Network Intelligence**: - - Detects **Slow APIs** (>1000ms by default) - - Identifies **Retry Storms** (rapid repeated failures) - - Captures **CORS Errors** and HTTP 4xx/5xx failures -- **โšก Performance Monitoring**: - - **Long Task Detection**: Flags UI freezes (>200ms) - - **White Screen Detection**: Alerts on potential rendering crashes -- **๐Ÿ›ก๏ธ Security Scanner**: - - Detects sensitive data leaks (JWTs, API keys, PII) in console/storage - - Monitors unsafe storage access -- **๐Ÿ“ฑ Smart Context**: Captures environment details (User Agent, Viewport, Route Changes) for actionable bug reports. -- **๐Ÿง  Adaptive Severity**: Automatically escalates issue severity based on frequency (e.g., repeating errors become Critical). - -## ๐Ÿ› ๏ธ Usage - -1. **Install the Extension** (Developer Mode): - - Clone this repo - - Run `npm install` and `npm run build` - - Open `chrome://extensions` - - Enable "Developer mode" - - Click "Load unpacked" and select the `dist` folder - -2. **Start a Session**: - - Click the extension icon - - Hit **Start Session** - - Interact with your web application - - TestPilot records all hidden issues in the background - -3. **Analyze & Export**: - - Open the popup to see a categorized list of issues - - Use **Filters** to focus on Critical/High severity bugs - - Click **Export JSON** or **Export Markdown** to generate a bug report +**Intelligent Bug Detection & Telemetry Chrome Extension for Modern Web Apps** + +TestPilot is a production-grade Chrome extension that acts as a silent flight recorder for your web application. It captures bugs, network failures, security risks, and performance issues in real-time โ€” before your users report them. + +--- + +## โœจ Features + +### ๐Ÿ–ฅ๏ธ Console Monitoring +- Intercepts `console.error` and `console.warn` calls from deep inside the page (via a **Main World bridge script** that runs before any other JS) +- Captures the **caller file, line, and column** from the stack trace automatically +- Passes every console message through the **Security Scanner** before logging + +### ๐ŸŒ Network Intelligence +- Wraps both **`window.fetch`** and **`XMLHttpRequest`** to intercept all outgoing requests +- Captures **HTTP 4xx / 5xx** failures as `network_failure` issues +- Detects **Slow APIs** โ€” requests exceeding the configurable threshold (default: 1000ms) +- Detects **API Retry Storms** โ€” automatically escalates to `retry_storm` (Critical) when the same endpoint fails 3+ times within 5 seconds +- Records **request payload**, **response status**, and **response body** (up to 2000 chars) for every failing or slow request + +### โšก Runtime Crash Detection +- Listens for `window.onerror` to catch **unhandled JavaScript exceptions** with full file/line/column/stack metadata +- Listens for `window.onunhandledrejection` to catch **unhandled Promise rejections** + +### ๐Ÿ“ฆ Broken Resource Detection +- Listens on the capture phase for failed loads of ``, `