BrowserStack Cross-Browser Testing is a development claude skill built by Alireza Rezvani. Best for: QA engineers and developers verify web app compatibility across Chrome, Firefox, and Safari on Windows, macOS, and mobile without local setup..
- What it does
- Configure and run Playwright tests across multiple browsers and OS combinations on BrowserStack's cloud grid.
- Category
- development
- Created by
- Alireza Rezvani
- Last updated
BrowserStack Cross-Browser Testing
Configure and run Playwright tests across multiple browsers and OS combinations on BrowserStack's cloud grid.
Skill instructions
name: "browserstack" description: >- Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".
BrowserStack Integration
Run Playwright tests on BrowserStack's cloud grid for cross-browser and cross-device testing.
Prerequisites
Environment variables must be set:
BROWSERSTACK_USERNAME— your BrowserStack usernameBROWSERSTACK_ACCESS_KEY— your access key
If not set, inform the user how to get them from browserstack.com/accounts/settings and stop.
Capabilities
1. Configure for BrowserStack
/pw:browserstack setup
Steps:
- Check current
playwright.config.ts - Add BrowserStack connect options:
// Add to playwright.config.ts
import { defineConfig } from '@playwright/test';
const isBS = !!process.env.BROWSERSTACK_USERNAME;
export default defineConfig({
// ... existing config
projects: isBS ? [
{
name: "chromelatestwindows-11",
use: {
connectOptions: {
wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
'browser': 'chrome',
'browser_version': 'latest',
'os': 'Windows',
'os_version': '11',
'browserstack.username': process.env.BROWSERSTACK_USERNAME,
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
}))}`,
},
},
},
{
name: "firefoxlatestwindows-11",
use: {
connectOptions: {
wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
'browser': 'playwright-firefox',
'browser_version': 'latest',
'os': 'Windows',
'os_version': '11',
'browserstack.username': process.env.BROWSERSTACK_USERNAME,
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
}))}`,
},
},
},
{
name: "webkitlatestos-x-ventura",
use: {
connectOptions: {
wsEndpoint: `wss://cdp.browserstack.com/playwright?caps=${encodeURIComponent(JSON.stringify({
'browser': 'playwright-webkit',
'browser_version': 'latest',
'os': 'OS X',
'os_version': 'Ventura',
'browserstack.username': process.env.BROWSERSTACK_USERNAME,
'browserstack.accessKey': process.env.BROWSERSTACK_ACCESS_KEY,
}))}`,
},
},
},
] : [
// ... local projects fallback
],
});
- Add npm script:
"test:e2e:cloud": "npx playwright test --project='chrome@*' --project='firefox@*' --project='webkit@*'"
2. Run Tests on BrowserStack
/pw:browserstack run
Steps:
- Verify credentials are set
- Run tests with BrowserStack projects:
BROWSERSTACK_USERNAME=$BROWSERSTACK_USERNAME \ BROWSERSTACK_ACCESS_KEY=$BROWSERSTACK_ACCESS_KEY \ npx playwright test --project='chrome@*' --project='firefox@*' - Monitor execution
- Report results per browser
3. Get Build Results
/pw:browserstack results
Steps:
- Call
browserstack_get_buildsMCP tool - Get latest build's sessions
- For each session:
- Status (pass/fail)
- Browser and OS
- Duration
- Video URL
- Log URLs
- Format as summary table
4. Check Available Browsers
/pw:browserstack browsers
Steps:
- Call
browserstack_get_browsersMCP tool - Filter for Playwright-compatible browsers
- Display available browser/OS combinations
5. Local Testing
/pw:browserstack local
For testing localhost or staging behind firewall:
- Install BrowserStack Local:
npm install -D browserstack-local - Add local tunnel to config
- Provide setup instructions
MCP Tools Used
| Tool | When |
|---|---|
| browserstack_get_plan | Check account limits |
| browserstack_get_browsers | List available browsers |
| browserstack_get_builds | List recent builds |
| browserstack_get_sessions | Get sessions in a build |
| browserstack_get_session | Get session details (video, logs) |
| browserstack_update_session | Mark pass/fail |
| browserstack_get_logs | Get text/network logs |
Output
- Cross-browser test results table
- Per-browser pass/fail status
- Links to BrowserStack dashboard for video/screenshots
- Any browser-specific failures highlighted
Use this skill
Most skills are portable instruction packages. Claude Code supports SKILL.md directly. Other agents can use adapted files like AGENTS.md, .cursorrules, and GEMINI.md.
Claude Code
Save SKILL.md into your Claude Skills folder, then restart Claude Code.
mkdir -p ~/.claude/skills/browserstack-cross-browser-testing && curl -L "https://raw.githubusercontent.com/alirezarezvani/claude-skills/HEAD/engineering-team/playwright-pro/skills/browserstack/SKILL.md" -o ~/.claude/skills/browserstack-cross-browser-testing/SKILL.mdInstalls to ~/.claude/skills/browserstack-cross-browser-testing/SKILL.md.
Use cases
QA engineers and developers verify web app compatibility across Chrome, Firefox, and Safari on Windows, macOS, and mobile without local setup.
Reviews
No reviews yet. Be the first to review this skill.
No signup required