https://github.com/browserstack/speedlab-code-samples
Demonstrates the workflow of SpeedLab APIs
https://github.com/browserstack/speedlab-code-samples
Last synced: 11 months ago
JSON representation
Demonstrates the workflow of SpeedLab APIs
- Host: GitHub
- URL: https://github.com/browserstack/speedlab-code-samples
- Owner: browserstack
- Created: 2022-02-28T14:01:02.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T19:12:23.000Z (about 2 years ago)
- Last Synced: 2025-04-22T21:06:45.424Z (11 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 3
- Watchers: 6
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpeedLab-API-demo
Demonstrates the workflow of SpeedLab APIs
# How to run scripts
## Node
1. Inside node directory: `npm install`
2. In `config.js` replace `browserstack_access_key` with `YOUR_USERNAME` and `browserstack_selenium_key` with `YOUR_ACCESS_KEY`
3. To run the test: `node index.js [TEST_URL]`
4. You will get a `job_id` from this script. Add it in `config.js`
5. To see the report status and result, run `node get_report.js` after some time ( ~60 seconds). Make sure you add the correct `job_id` in `config.js` to get proper results.
## Postman Collection
1. Import `speedlab-api.postman_collection.json` in your postman
2. Under `SpeedlabAPI.Authorization` replace `browserstack_access_key` with `YOUR_USERNAME` and `browserstack_selenium_key` with `YOUR_ACCESS_KEY`
3. Now you can access all the endpoints
4. Make sure to update the `PathVariables.id` wherever required with the relevant `report_id` that you get from `POST: /generate` endpoint