
BrowserStack Integration
FreeRun Playwright tests on BrowserStack's cloud grid.
Free · Opens the source repo
What BrowserStack Integration does
The BrowserStack Integration skill allows developers to run Playwright tests directly on BrowserStack's cloud grid, facilitating cross-browser and cross-device testing. This integration is essential for teams looking to ensure their web applications function seamlessly across various browsers and operating systems. By leveraging BrowserStack, developers can test their applications in real-world environments without the need for extensive local setups.
To get started, users must configure their environment by setting the necessary BrowserStack credentials. The skill provides a straightforward setup command that checks the existing Playwright configuration and appends the required BrowserStack options. Once configured, users can run their tests across multiple browsers with a simple command, streamlining the testing process and improving efficiency.
The skill also includes features for monitoring test execution and retrieving build results, which helps teams quickly identify issues and understand the performance of their applications across different environments. Users can check available browser options and even set up local testing for applications behind firewalls, ensuring comprehensive coverage of their testing needs.
Overall, this skill is designed for developers and QA engineers who want to integrate BrowserStack into their testing workflows, ensuring their applications are compatible across a wide range of browsers and devices. By automating the testing process with this skill, teams can focus on development while maintaining high-quality standards in their applications.
When to use it
Use this skill when you need to run automated tests on multiple browsers and devices via BrowserStack.
When not to use it
This skill may not be suitable for projects that do not require cross-browser testing or for those that prefer local testing environments without cloud integration.
What you can build with it
Automated Cross-Browser Testing
Run your Playwright tests on BrowserStack to ensure your web application works across different browsers and devices.
Local Testing Setup
Use the local testing feature to test applications hosted on localhost or behind a firewall, ensuring full coverage.
Monitor Test Results
Quickly access build results and session details to analyze the performance of your tests across various environments.
How to install BrowserStack Integration
View source1. Install with the skills CLI
npx skills add alirezarezvani/claude-skills/browserstack --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by alirezarezvaniBrowserStack 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
Frequently asked questions about BrowserStack Integration
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
