|
1 | | -Testem integration with BrowserStack |
2 | | -==================================== |
| 1 | +BrowserStack Integration |
| 2 | +======================== |
3 | 3 |
|
4 | | -Running test using Testem on BrowserStack can be done by cloning this repo and following the below steps: |
| 4 | +Run your tests on various browsers hosted on Browserstack! |
5 | 5 |
|
6 | | -Install browserstack-cli |
7 | | ------------------------- |
8 | | -Testem depends internally on [browserstack-cli] for running the tests. |
| 6 | +Instructions |
| 7 | +------------ |
9 | 8 |
|
10 | | -Please install and setup [browserstack-cli] before continuing. You should see something similar when setting up browserstack-cli. |
| 9 | +1. Get a [BrowserStack](browserstack.com) account. |
| 10 | +2. For BrowserStack Authentication 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=<browserstack-username> && export BROWSERSTACK_KEY=<browserstack-access-key>` |
| 11 | +3. Install the dependencies by running `npm install browserstack browserstacktunnel-wrapper` |
| 12 | +4. Run the command `testem ci -l bs_chrome` to test out the setup with just the Chrome browser hosted BrowserStack. |
| 13 | +5. Run `testem ci` to run it on all the listed browsers - see `testem launchers` for the full list. |
11 | 14 |
|
12 | | - Username: <your-username> |
13 | | - Password: <your-api-key/browserstack-password> |
14 | | - Tunnel private key (see while logged in http://www.browserstack.com/local-testing): <your-tunnel-key> |
15 | | - Tunnel API key (see while logged in http://www.browserstack.com/automated-browser-testing-api#automated-local-testing): <your-api-key> |
16 | | - Wrote <your-home-directory>/.browserstack/browserstack.json |
17 | | - |
18 | | - Downloading BrowserStackTunnel.jar [===================] 100% |
19 | | - |
20 | | -Installing testem |
21 | | ------------------ |
22 | | -Please install [testem] before proceeding. |
23 | | - |
24 | | -Running Tests |
25 | | -------------- |
26 | | -From the root of this repository run: |
27 | | - |
28 | | - testem ci -l bs_chrome |
29 | | - |
30 | | -P.S. All launchers are defined with 'launch_in_ci'. You will probably want to edit the testem.yml. |
31 | | - |
32 | | -### Attribution |
33 | | - |
34 | | -Most of the code in this repo is taken from samples in [testem] repository. |
35 | | - |
36 | | - |
37 | | -## Issues |
38 | | -If you are getting any errors with the tunnel setup. Then try downloading the [jar] again and placing it in `<your-home-directory>/.browserstack` location. |
39 | | - |
40 | | - |
41 | | -[browserstack-cli]: https://github.com/dbrans/browserstack-cli |
42 | | -[testem]: https://github.com/airportyh/testem |
43 | | -[jar]: http://www.browserstack.com/BrowserStackTunnel.jar |
0 commit comments