|
1 | 1 | # jest-appium-app-browserstack
|
2 | 2 | This repository demonstrates how to run Appium tests in Jest on BrowserStack App Automate.
|
| 3 | + |
| 4 | +## Setup |
| 5 | + |
| 6 | +### Requirements |
| 7 | + |
| 8 | +1. Node.js |
| 9 | + |
| 10 | + - If not installed, install Node.js from [here](https://nodejs.org/en/download/) |
| 11 | + |
| 12 | + - Ensure you have node & npm installed by running `node -v` & `npm -v` |
| 13 | + |
| 14 | +### Install the dependencies |
| 15 | + |
| 16 | +For Android tests, run the following command in project's base directory : |
| 17 | + |
| 18 | +``` |
| 19 | +cd android |
| 20 | +npm install |
| 21 | +``` |
| 22 | +Or, |
| 23 | + |
| 24 | +For dependencies for iOS tests, run following command in project's base directory : |
| 25 | +``` |
| 26 | +cd ios |
| 27 | +npm install |
| 28 | +``` |
| 29 | +## Getting Started |
| 30 | + |
| 31 | +Getting Started with Appium tests in NodeJS mocha on BrowserStack couldn't be easier! |
| 32 | + |
| 33 | +### Run your first test : |
| 34 | + |
| 35 | +Open `Android` or in `ios` folder |
| 36 | + |
| 37 | +- If you have uploaded your app then add the app id to the `browserstack.yml` config file, or you can directly specify the path to your app in the `browserstack.yml` file. |
| 38 | + |
| 39 | +- Run `npm run sample-test` |
| 40 | + |
| 41 | +- You can access the test execution results, and debugging information such as video recording, network logs on [App Automate dashboard](https://app-automate.browserstack.com/dashboard) |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +### **Use Local testing for apps that access resources hosted in development or testing environments :** |
| 46 | + |
| 47 | +Open `Android` or in `ios` folder |
| 48 | + |
| 49 | +- Ensure that `browserstackLocal` capability is set to `true` in the `browserstack.yml` file. |
| 50 | + |
| 51 | +- If you have uploaded your app then add the app id to the `browserstack.yml` config file, or you can directly specify the path to your app in the `browserstack.yml` file. |
| 52 | + |
| 53 | +- Run `npm run sample-local-test` |
| 54 | + |
| 55 | +- You can access the test execution results, and debugging information such as video recording, network logs on [App Automate dashboard](https://app-automate.browserstack.com/dashboard) |
| 56 | + |
| 57 | +## Integration with other NodeJS frameworks |
| 58 | + |
| 59 | +For other NodeJS frameworks samples, refer to following repositories : |
| 60 | + |
| 61 | +- [WebdriverIO](https://github.com/browserstack/webdriverio-appium-app-browserstack) |
| 62 | + |
| 63 | +Note: For other test frameworks supported by App-Automate refer our [Developer documentation](https://www.browserstack.com/docs/) |
| 64 | + |
| 65 | +## Getting Help |
| 66 | + |
| 67 | +If you are running into any issues or have any queries, please check [Browserstack Support page](https://www.browserstack.com/support/app-automate) or [get in touch with us](https://www.browserstack.com/contact?ref=help). |
0 commit comments