Skip to content

Commit f783195

Browse files
authored
Branch pushkar (#118)
* Update README and add new assets * Update README * Update README * Update README * Update README * Update README * Update README * Update README * Update README * Update README * Update README * Update README.md * Update README.md
1 parent 0b54419 commit f783195

File tree

5 files changed

+225
-0
lines changed

5 files changed

+225
-0
lines changed

README.md

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Manage, execute, debug tests, and even fix code using plain English prompts.
3535
#### Reduced context switching:
3636
Stay in flow—keep all project context in one place and trigger actions directly from your IDE or LLM.
3737

38+
## ⚡️ One Click MCP Setup
39+
40+
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](http://mcp.browserstack.com/one-click-setup?client=vscode)   [![Install in Cursor](https://img.shields.io/badge/Cursor-Install_Server-24bfa5?style=flat-square&color=000000&logo=visualstudiocode&logoColor=white)](http://mcp.browserstack.com/one-click-setup?client=cursor)
41+
3842
## 💡 Usage Examples
3943

4044
### 📱 Manual App Testing
@@ -138,8 +142,13 @@ Generate test cases from PRDs, convert manual tests to low-code automation, and
138142
139143
## 🛠️ Installation
140144
145+
### **One Click MCP Setup**
146+
141147
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](http://mcp.browserstack.com/one-click-setup?client=vscode)   [![Install in Cursor](https://img.shields.io/badge/Cursor-Install_Server-24bfa5?style=flat-square&color=000000&logo=visualstudiocode&logoColor=white)](http://mcp.browserstack.com/one-click-setup?client=cursor)
142148
149+
150+
### **Alternate ways to Setup MCP server**
151+
143152
1. **Create a BrowserStack Account**
144153
145154
- Sign up for [BrowserStack](https://www.browserstack.com/users/sign_up) if you don't have an account already.
@@ -150,9 +159,21 @@ Generate test cases from PRDs, convert manual tests to low-code automation, and
150159
- Once you have an account (and purchased appropriate plan), note down your `username` and `access_key` from [Account Settings](https://www.browserstack.com/accounts/profile/details).
151160
152161
2. Ensure you are using Node version >= `18.0`. Check your node version using `node --version`. Recommended version: `v22.15.0` (LTS)
162+
153163
3. **Install the MCP Server**
154164
155165
- VSCode (Copilot - Agent Mode): `.vscode/mcp.json`:
166+
167+
- Locate or Create the Configuration File:
168+
In the root directory of your project, look for a folder named .vscode. This folder is usually hidden so you will need to find it as mentioned in the expand.
169+
170+
- If this folder doesn't exist, create it.
171+
172+
- Inside the .vscode folder, create a new file named mcp.json
173+
174+
- Add the Configuration: Open the mcp.json file and then add the following JSON content.
175+
176+
- Replace the username and <access_key> with your BrowserStack credentials.
156177
157178
```json
158179
{
@@ -172,6 +193,30 @@ Generate test cases from PRDs, convert manual tests to low-code automation, and
172193
- In VSCode, make sure to click on `Start` button in the MCP Server to start the server.
173194
![Start MCP Server](assets/vscode_install.png)
174195
196+
197+
#### ** Alternate way to setup MCP on VSCode Copilot
198+
199+
1.Click on the gear icon to Select Tools
200+
<div align="center">
201+
<img src="assets/select_tools.png" alt="Select Tools" height="100">
202+
</div>
203+
2. A tool menu would appear at the top-centre, scroll down on the menu at the top and then Click on Add MCP Server
204+
<div align="center">
205+
<img src="assets/add_mcp_server.png" alt="Add MCP Server" height="100">
206+
</div>
207+
3. Select NPM package option (Install fron an NPM package) - 3rd in the list
208+
<div align="center">
209+
<img src="assets/select_npm_package.png" alt="Select NPM Package" height="100">
210+
</div>
211+
4. Enter NPM Package Name (@browserstack/mcp-server)
212+
<div align="center">
213+
<img src="assets/enter_npm_package.png" alt="Enter NPM Package" height="100">
214+
</div>
215+
5. Enter browserstack user name and access key
216+
217+
218+
219+
175220
* For Cursor: `.cursor/mcp.json`:
176221
177222
```json
@@ -233,6 +278,186 @@ To install BrowserStack Test Platform Server for Claude Desktop automatically vi
233278
npx -y @smithery/cli install @browserstack/mcp-server --client claude
234279
```
235280
281+
282+
### 💡 List of BrowserStack MCP Tools
283+
284+
As of now we support 20 tools.
285+
286+
287+
---
288+
289+
## 🧾 Test Management
290+
291+
1. `createProjectOrFolder` — Create a Test Management project and/or folders to organize test cases. Returns with Folder ID, Project ID and Test Management Link to access the TM Project Dashboard.
292+
**Prompt example**
293+
294+
```text
295+
Create a new Test Management project named 'Shopping App' with two folders - Login and Checkout
296+
```
297+
298+
299+
2. `createTestCase` — Add a manual test case under a specific project/folder (uses project identifier like PR-xxxxx and a folder ID).
300+
**Prompt example**
301+
302+
```text
303+
Add a test case named 'Invalid Login Scenario' to the Login folder in the 'Shopping App' project with PR-53617, Folder ID: 117869
304+
```
305+
306+
3. `listTestCases` — List test cases for a project (supports filters like priority, status, tags).
307+
**Prompt example**
308+
309+
```text
310+
List all high-priority test cases in the 'Shopping App' project with project_identifier: PR-59457
311+
```
312+
313+
4. `createTestRun` — Create a test run (suite) for selected test cases in a project.
314+
**Prompt example**
315+
316+
```text
317+
Create a test run for the Login folder in the 'Shopping App' project and name it 'Release v1.0 Login Flow'
318+
```
319+
320+
5. `listTestRuns` — List test runs for a project (filter by dates, assignee, state).
321+
**Prompt example**
322+
323+
```text
324+
List all test runs from the 'Shopping App' project that were executed last week and are currently marked in-progress
325+
```
326+
327+
6. `updateTestRun` — Partially update a test run (status, tags, notes, associated test cases).
328+
**Prompt example**
329+
330+
```text
331+
Update test run ID 1043 in the 'Shopping App' project and mark it as complete with the note 'Regression cycle done'
332+
```
333+
334+
7. `addTestResult` — Add a manual execution result (passed/failed/blocked/skipped) for a test case within a run.
335+
**Prompt example**
336+
337+
```text
338+
Mark the test case 'Invalid Login Scenario' as passed in test run ID 1043 of the 'Shopping App' project
339+
```
340+
341+
8. `createTestCasesFromFile` — Bulk-create test cases from an uploaded file (e.g., PDF).
342+
**Prompt example**
343+
344+
```text
345+
Upload test cases from '/Users/xyz/testcases.pdf' to the 'Shopping App' project in Test Management
346+
```
347+
348+
---
349+
350+
## ⚙️ BrowserStack SDK Setup / Automate Test
351+
352+
9. `setupBrowserStackAutomateTests` — Integrate BrowserStack SDK and run web tests on BrowserStack (optionally enable Percy).
353+
**Prompt example**
354+
355+
```text
356+
Run my Selenium-JUnit5 tests written in Java on Chrome and Firefox. Enable Percy for visual testing.
357+
```
358+
359+
10. `fetchAutomationScreenshots` — Fetch screenshots captured during a given Automate/App Automate session.
360+
**Prompt example**
361+
362+
```text
363+
Get screenshots from Automate session ID abc123xyz for my desktop test run
364+
```
365+
366+
---
367+
368+
## 🔍 Observability
369+
370+
11. `getFailureLogs` — Retrieve error logs for Automate/App Automate sessions (optionally by Build ID for App Automate).
371+
**Prompt example**
372+
373+
```text
374+
Get the error logs from the session ID: 21a864032a7459f1e7634222249b316759d6827f, Build ID: dt7ung4wmjittzff8kksrjadjax9gzvbscoyf9qn of App Automate test session
375+
```
376+
377+
---
378+
379+
## 📱 App Live
380+
381+
12. `runAppLiveSession` — Start a manual app testing session on a real device in the cloud.
382+
**Prompt example**
383+
384+
```text
385+
Open my app on iPhone 15 Pro Max with iOS 17. App path is /Users/xyz/app.ipa
386+
```
387+
388+
---
389+
390+
## 💻 Live
391+
392+
13. `runBrowserLiveSession` — Start a Live session for website testing on desktop or mobile browsers.
393+
**Prompt example**
394+
395+
```text
396+
Open www.google.com on the latest version of Microsoft Edge on Windows 11
397+
```
398+
399+
---
400+
401+
## 📲 App Automate
402+
403+
14. `takeAppScreenshot` — Launch the app on a specified device and captures a quick verification screenshot. This tool is just to verify whether your app has been launched.
404+
**Prompt example**
405+
406+
```text
407+
Take a screenshot of my app on Google Pixel 6 with Android 14 while testing on App Automate. App file path: /Users/xyz/app-debug.apk
408+
```
409+
410+
15. `runAppTestsOnBrowserStack` — Run automated mobile tests (Espresso/XCUITest, etc.) on real devices.
411+
**Prompt example**
412+
413+
```text
414+
Run Espresso tests from /tests/checkout.zip on Galaxy S21 and Pixel 6 with Android 14. App path is /apps/beta-release.apk under project 'Checkout Flow'
415+
```
416+
417+
---
418+
419+
## ♿ Accessibility
420+
421+
16. `accessibilityExpert` — Ask A11y Expert (WCAG 2.0/2.1/2.2, mobile/web usability, best practices).
422+
**Prompt example**
423+
424+
```text
425+
What WCAG guidelines apply to form field error messages on mobile web?
426+
```
427+
428+
17. `startAccessibilityScan` — Start a web accessibility scan and return the result link.
429+
**Prompt example**
430+
431+
```text
432+
Run accessibility scan for "www.example.com"
433+
```
434+
435+
---
436+
437+
## 🤖 BrowserStack AI Agents
438+
439+
18. `fetchSelfHealedSelectors` — Retrieve AI self-healed selectors to fix flaky tests due to DOM changes.
440+
**Prompt example**
441+
442+
```text
443+
Fetch and fix flaky test selectors in Automate session ID session_9482 using MCP
444+
```
445+
446+
19. `createLCASteps` — Generate Low Code Automation steps from a manual test case in Test Management.
447+
**Prompt example**
448+
449+
```text
450+
Convert the manual test case 'Add to Cart' in the 'Shopping App' project into LCA steps
451+
```
452+
453+
20. `uploadProductRequirementFile` — Upload a PRD/screenshot/PDF and get a file mapping ID (used with `createTestCasesFromFile`).
454+
**Prompt example**
455+
456+
```text
457+
Upload PRD from /Users/xyz/Desktop/login-flow.pdf and use BrowserStack AI to generate test cases
458+
```
459+
460+
236461
## 🤝 Recommended MCP Clients
237462
238463
- We recommend using **Github Copilot or Cursor** for automated testing + debugging use cases.

assets/add_mcp_server.png

8.57 KB
Loading

assets/enter_npm_package.png

14.5 KB
Loading

assets/select_npm_package.png

44.1 KB
Loading

assets/select_tools.png

17.8 KB
Loading

0 commit comments

Comments
 (0)