|
1 |
| -# Use QA |
| 1 | +# 🎯 Use QA |
2 | 2 |
|
3 |
| -E2E QA testing example using BrowserUse, showcasing as many features of BrowserUse as possible, having a copy-pastable code that can easily be reused. |
| 3 | +**AI-Powered E2E Testing Platform** ✨ |
4 | 4 |
|
5 |
| -# Set Up |
| 5 | +> A comprehensive, production-ready QA testing solution powered by BrowserUse AI agents. Automate your web application testing with intelligent agents that think, act, and validate like human testers—but faster, more consistently, and around the clock. |
| 6 | +
|
| 7 | +[](https://docker.com) [](https://browser-use.com) [](https://nextjs.org) [](https://typescriptlang.org) |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | + <img src="media/run.png" alt="Test Run in Progress" width="600px"> |
| 11 | +</p> |
| 12 | + |
| 13 | +## ✨ Key Features & Highlights |
| 14 | + |
| 15 | +### 🤖 **AI-Powered Testing Engine** |
| 16 | + |
| 17 | +- **Intelligent Agents**: Leverages BrowserUse with GPT-4o/o3 models for human-like testing |
| 18 | +- **Natural Language Tests**: Write test cases in plain English—no complex selectors needed |
| 19 | +- **Smart Evaluation**: AI agents validate end states against success criteria with precision |
| 20 | +- **Adaptive Execution**: Handles dynamic content, popups, and unexpected UI changes |
| 21 | + |
| 22 | +### 🎯 **Advanced Test Management** |
| 23 | + |
| 24 | +- **Test Suites**: Organize related tests into logical groups by domain or feature |
| 25 | +- **Step-by-Step Definitions**: Break down complex user journeys into clear, actionable steps |
| 26 | +- **Visual Test Editor**: Intuitive interface for creating and managing test scenarios |
| 27 | +- **Flexible Evaluation**: Define custom success criteria for any testing scenario |
| 28 | + |
| 29 | +### ⏰ **Automated Scheduling & Monitoring** |
| 30 | + |
| 31 | +- **Cron Integration**: Schedule test runs hourly, daily, or on custom intervals |
| 32 | +- **Real-time Execution**: Watch your tests run live with detailed step-by-step progress |
| 33 | +- **Complete Audit Trail**: Full history of all test runs with timestamps and results |
| 34 | +- **Status Tracking**: Monitor test suite health with comprehensive dashboards |
| 35 | + |
| 36 | +### 📧 **Smart Notifications** |
| 37 | + |
| 38 | +- **Instant Alerts**: Get notified immediately when tests fail via email |
| 39 | +- **Failure Details**: Receive detailed error reports with context and screenshots |
| 40 | +- **Team Collaboration**: Share test results and failures with your entire team |
| 41 | +- **Customizable Recipients**: Configure notifications per test suite |
| 42 | + |
| 43 | +### 🛡️ **Enterprise-Grade Security** |
| 44 | + |
| 45 | +- **Domain Restrictions**: Limit AI agents to specific allowed domains |
| 46 | +- **Proxy Support**: Built-in proxy integration for secure testing |
| 47 | +- **Ad Blocker**: Clean testing environment without distractions |
| 48 | +- **Encrypted Storage**: Secure handling of sensitive test data |
| 49 | + |
| 50 | +## 🚀 Quick Start Guide |
| 51 | + |
| 52 | +### Prerequisites |
| 53 | + |
| 54 | +- 🐳 **Docker** & Docker Compose installed |
| 55 | +- 🔑 **BrowserUse API Key** (get yours at [browser-use.com](https://browser-use.com)) |
| 56 | +- 📧 **Resend API Key** (optional, for email notifications) |
| 57 | + |
| 58 | +### ⚡ 3-Step Setup |
6 | 59 |
|
7 | 60 | ```bash
|
8 |
| -# Clone repository |
9 |
| -git clone [email protected]:browser-use/use-qa.git |
| 61 | +# 1️⃣ Clone the repository |
| 62 | +git clone https://github.com/browser-use/use-qa.git |
| 63 | +cd use-qa |
10 | 64 |
|
11 |
| -# Copy Environment Variables and Fill API Key |
| 65 | +# 2️⃣ Configure environment variables |
12 | 66 | cp .env.example .env
|
| 67 | +# Edit .env and add your API keys |
13 | 68 |
|
14 |
| -# Start |
| 69 | +# 3️⃣ Launch the platform |
15 | 70 | docker compose up
|
16 | 71 | ```
|
| 72 | + |
| 73 | +🎉 **That's it!** Visit [http://localhost:3000](http://localhost:3000) to start creating your first test suite. |
| 74 | + |
| 75 | +### 🔧 Environment Variables |
| 76 | + |
| 77 | +Create a `.env` file with the following: |
| 78 | + |
| 79 | +```env |
| 80 | +# Required: BrowserUse API Integration |
| 81 | +BROWSER_USE_API_KEY=your_browseruse_api_key_here |
| 82 | +
|
| 83 | +# Database Configuration |
| 84 | +DATABASE_URL=postgresql://postgres:postgres@postgres:5432/qa-use |
| 85 | +
|
| 86 | +# Optional: Email Notifications |
| 87 | +RESEND_API_KEY=your_resend_api_key_here |
| 88 | +
|
| 89 | +# Optional: Inngest Configuration (for production) |
| 90 | +INNGEST_SIGNING_KEY=your_inngest_signing_key |
| 91 | +INNGEST_BASE_URL=http://inngest:8288 |
| 92 | +``` |
| 93 | + |
| 94 | +<p align="center"> |
| 95 | + <img src="media/suite.png" alt="Test Suite Interface" width="600px"> |
| 96 | +</p> |
| 97 | + |
| 98 | +## 💡 How It Works |
| 99 | + |
| 100 | +### 🎯 **Intelligent Test Execution** |
| 101 | + |
| 102 | +1. **Define Your Test**: Write test steps in natural language |
| 103 | + |
| 104 | + ``` |
| 105 | + Steps: |
| 106 | + 1. Go to example.com |
| 107 | + 2. Click the search button |
| 108 | + 3. Type "laptop" in the search field |
| 109 | + 4. Press enter and wait for results |
| 110 | +
|
| 111 | + Success Criteria: |
| 112 | + The page should show at least 3 laptop search results |
| 113 | + ``` |
| 114 | + |
| 115 | +2. **AI Agent Takes Over**: BrowserUse AI agents execute your test |
| 116 | + - Navigate to pages like a human user |
| 117 | + - Interact with elements intelligently |
| 118 | + - Handle unexpected popups and dialogs |
| 119 | + - Adapt to layout changes and dynamic content |
| 120 | + |
| 121 | +3. **Smart Validation**: AI evaluates results against your criteria |
| 122 | + - Checks final page state precisely |
| 123 | + - Compares actual vs. expected outcomes |
| 124 | + - Provides detailed pass/fail reports |
| 125 | + - Captures screenshots and recordings |
| 126 | + |
| 127 | +### 🔄 **Automated Workflows** |
| 128 | + |
| 129 | +- **Continuous Monitoring**: Schedule tests to run automatically |
| 130 | +- **Failure Detection**: Instant alerts when something breaks |
| 131 | +- **Historical Analysis**: Track test reliability over time |
| 132 | +- **Team Notifications**: Keep everyone informed of system health |
| 133 | + |
| 134 | +## 🎯 Perfect Use Cases |
| 135 | + |
| 136 | +### 🛒 **E-Commerce Testing** |
| 137 | + |
| 138 | +- Product search and filtering |
| 139 | +- Shopping cart functionality |
| 140 | +- Checkout process validation |
| 141 | +- User account management |
| 142 | + |
| 143 | +### 📊 **SaaS Application Testing** |
| 144 | + |
| 145 | +- User onboarding flows |
| 146 | +- Feature functionality checks |
| 147 | +- Integration testing |
| 148 | +- Performance monitoring |
| 149 | + |
| 150 | +### 🏢 **Enterprise Workflows** |
| 151 | + |
| 152 | +- Critical business processes |
| 153 | +- Compliance validation |
| 154 | +- Multi-step form submissions |
| 155 | +- Dashboard and reporting features |
| 156 | + |
| 157 | +### 🔄 **Regression Testing** |
| 158 | + |
| 159 | +- Pre-deployment validation |
| 160 | +- Release confidence checks |
| 161 | +- Cross-browser compatibility |
| 162 | +- Mobile responsiveness testing |
| 163 | + |
| 164 | +## 🚀 Getting Started with Your First Test |
| 165 | + |
| 166 | +### 1. **Create a Test Suite** |
| 167 | + |
| 168 | +- Navigate to the dashboard |
| 169 | +- Click "Create Suite" |
| 170 | +- Set your application domain (e.g., `example.com`) |
| 171 | +- Configure notification preferences |
| 172 | + |
| 173 | +### 2. **Add Your First Test** |
| 174 | + |
| 175 | +- Click "Add Test" in your suite |
| 176 | +- Write a descriptive test name |
| 177 | +- Add step-by-step instructions |
| 178 | +- Define success criteria |
| 179 | + |
| 180 | +### 3. **Run and Monitor** |
| 181 | + |
| 182 | +- Hit "Run Test" to execute immediately |
| 183 | +- Watch the live execution in real-time |
| 184 | +- Review results and recordings |
| 185 | +- Set up automated scheduling |
| 186 | + |
| 187 | +### 4. **Scale Your Testing** |
| 188 | + |
| 189 | +- Add more tests to your suite |
| 190 | +- Configure cron schedules |
| 191 | +- Set up team notifications |
| 192 | +- Monitor long-term trends |
| 193 | + |
| 194 | +## 🤝 Contributing |
| 195 | + |
| 196 | +We welcome contributions! This project showcases the full capabilities of BrowserUse and serves as a reference implementation for AI-powered testing platforms. |
| 197 | + |
| 198 | +### Development Setup |
| 199 | + |
| 200 | +```bash |
| 201 | +# Start development environment |
| 202 | +docker compose -f docker-compose.dev.yaml up --watch |
| 203 | + |
| 204 | +# Run type checking |
| 205 | +pnpm run test:types |
| 206 | +``` |
| 207 | + |
| 208 | +## 📚 Resources & Links |
| 209 | + |
| 210 | +- 🤖 **[BrowserUse Documentation](https://docs.browser-use.com)** - Learn about AI browser automation |
| 211 | +- 🌐 **[BrowserUse Cloud](https://cloud.browser-use.com)** - Try BrowserUse in your browser |
| 212 | +- 📧 **[Resend Documentation](https://resend.com/docs)** - Email integration guide |
| 213 | +- ⚡ **[Inngest Documentation](https://inngest.com/docs)** - Background job processing |
| 214 | + |
| 215 | +## 📄 License |
| 216 | + |
| 217 | +This project is open source and available under the [MIT License](LICENSE). |
| 218 | + |
| 219 | +--- |
| 220 | + |
| 221 | +<div align="center"> |
| 222 | + |
| 223 | +**Built with ❤️ by the BrowserUse team** |
| 224 | + |
| 225 | +[⭐ Star on GitHub](https://github.com/browser-use/use-qa) • [🐛 Report Bug](https://github.com/browser-use/use-qa/issues) • [💡 Request Feature](https://github.com/browser-use/use-qa/issues) |
| 226 | + |
| 227 | +</div> |
0 commit comments