https://github.com/browserstack/karma-browserstack-example
https://github.com/browserstack/karma-browserstack-example
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/browserstack/karma-browserstack-example
- Owner: browserstack
- Created: 2015-10-07T14:01:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T14:55:56.000Z (over 2 years ago)
- Last Synced: 2025-04-22T21:07:35.092Z (11 months ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 4
- Watchers: 11
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
Karma-BrowserStack Example
=========
Sample for using karma-browserstack-launcher to run Karma tests (QUnit framework) on BrowserStack infrastructure.
One test is failing on purpose as a demo of BrowserStack catching bugs in different browsers.
### Prerequisites
Node and npm
### Clone this repository
`git clone https://github.com/browserstack/karma-browserstack-example.git`
### Install dependencies
Navigate to appropriate directory for testing and then install the dependencies by running
`npm install`
### BrowserStack Configuration
Export the environment variables for the username and access key of your BrowserStack account.
These can be found on the automate accounts page on [BrowserStack](https://www.browserstack.com/accounts/automate).
`export BROWSERSTACK_USERNAME=`
`export BROWSERSTACK_ACCESS_KEY=`
You can further customize configuration in karma.conf.js. For detailed reference, visit karma-browserstack-launcher github repository [here](https://github.com/browserstack/karma-browserstack-launcher).
#### Run the tests
Execute the following command to run the karma tests:
`npm test`
###Note
- IE 6 and 7 Tests on Karma version 0.13 may fail(output - browser not captured).
- Use Karmav0.12 or below and add `transports: ['websocket','jsonp-polling']` to the karma.conf.js file
- Checkout [karma issue] for more details.
[dashboard]:https://www.browserstack.com/automate
[karma issue]:https://github.com/karma-runner/karma/issues/983