Playwright E2E Tests
Include your Playwright tests with your code. Bugrit runs them alongside 150 analysis modules and includes results in your unified report.
🤖 Vibe Coding Prompts
Choose your path and copy the prompt to your AI assistant:
Generate E2E tests for my app
Read the Bugrit Playwright docs at https://bugrit.com/docs/integrations/playwright Look at my web application and write Playwright E2E tests: 1. User can load the homepage 2. User can sign up / log in 3. Main user flows work correctly 4. Forms validate properly 5. Error states are handled Create a tests/ folder with the test files. Use page object pattern and descriptive test names. My stack: [YOUR_STACK]
✨Works with Claude, ChatGPT, Cursor, Copilot, Cody, and other AI coding assistants
💡 Why This Matters
Code analysis catches potential bugs. E2E tests catch actual bugs. Running both together gives you complete coverage.
- →One report: Test results and code analysis in a single unified view
- →All browsers: Chrome, Firefox, Safari tested on our infrastructure
- →Visual evidence: Screenshots and videos when tests fail
How It Works
- 1. Include Playwright tests in your repo
- 2. Bugrit detects
playwright.config.tsautomatically - 3. We run your tests in isolated browser environments
- 4. Results appear in your unified report
Technical Reference
Example Config
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
timeout: 30000,
retries: 2,
use: {
baseURL: process.env.BASE_URL || 'http://localhost:3000',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{ name: 'chromium', use: { browserName: 'chromium' } },
{ name: 'firefox', use: { browserName: 'firefox' } },
],
});API Request with E2E
curl -X POST https://bugrit.com/api/v1/scans \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"applicationId": "app-abc123",
"sourceType": "github",
"repoUrl": "https://github.com/yourorg/yourrepo",
"e2eConfig": {
"enabled": true,
"baseUrl": "https://staging.your-app.com",
"browsers": ["chromium", "firefox"]
}
}'E2E Config Options
| Option | Type | Description |
|---|---|---|
enabled | boolean | Enable E2E tests (default: auto-detect) |
baseUrl | string | URL to test against |
browsers | array | chromium, firefox, webkit |
timeout | number | Max test timeout in ms |
Report Output
{
"e2eTests": {
"framework": "playwright",
"summary": {
"total": 24,
"passed": 22,
"failed": 2,
"duration": 45230
},
"failures": [
{
"name": "should complete checkout",
"browser": "firefox",
"error": "Timeout waiting for payment",
"screenshot": "https://cdn.bugrit.com/..."
}
]
}
}