|
2 | 2 |
|
3 | 3 | A package to help with writing and executing e2e [Appium](http://appium.io) tests.
|
4 | 4 |
|
5 |
| -## <a name='requirements'></a>Requirments |
| 5 | +<!-- TOC depthFrom:2 --> |
| 6 | + |
| 7 | +- [Requirеments](#requirеments) |
| 8 | +- [Set Up](#set-up) |
| 9 | + - [Structure](#structure) |
| 10 | + - [Files Preview](#files-preview) |
| 11 | +- [Usage](#usage) |
| 12 | +- [Custom Appium Capabilities](#custom-appium-capabilities) |
| 13 | +- [Options](#options) |
| 14 | +- [Features](#features) |
| 15 | +- [Troubleshooting](#troubleshooting) |
| 16 | +- [Common Problems](#common-problems) |
| 17 | +- [Missing Features](#missing-features) |
| 18 | +- [Contribute](#contribute) |
| 19 | +- [Get Help](#get-help) |
| 20 | + |
| 21 | +<!-- /TOC --> |
| 22 | + |
| 23 | +## Requirеments |
6 | 24 |
|
7 | 25 | The `nativescript-dev-appium` plugin requires:
|
8 | 26 | * latest version of [Appium](https://github.com/appium/appium/releases)
|
9 | 27 | * latest version of [Xcode](https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html)
|
10 | 28 | * [Android SDK Tools](https://developer.android.com/studio/releases/sdk-tools.html) version greater than 25.3.0
|
11 | 29 |
|
12 |
| -## <a name='setup'></a>Set Up |
| 30 | +## Set Up |
13 | 31 |
|
14 | 32 | Add the plugin as a `devDependency` to your project:
|
15 | 33 |
|
16 |
| -`$ npm install -D nativescript-dev-appium` |
| 34 | +```shell |
| 35 | +$ npm install -D nativescript-dev-appium |
| 36 | +``` |
17 | 37 |
|
18 | 38 | Then install [Appium](https://www.npmjs.com/package/appium) - we recommend a global installation to avoid adding it to every project you would like to test:
|
19 | 39 |
|
20 |
| -`$ npm install -g appium` |
| 40 | +```shell |
| 41 | +$ npm install -g appium |
| 42 | +``` |
21 | 43 |
|
22 | 44 | After completion of the installation, if your project has a dependency to *TypeScript*, the plugin should have added an `e2e` folder containing predefined configs and samples.
|
23 | 45 |
|
@@ -52,7 +74,7 @@ After completion of the installation, if your project has a dependency to *TypeS
|
52 | 74 | > * `e2e/reports` - this folder is created during test execution and stores the actual images from comparison
|
53 | 75 | > * `e2e/resources` - this folder aims to store the expected images for comparison
|
54 | 76 |
|
55 |
| -## <a name='usage'></a>Usage |
| 77 | +## Usage |
56 | 78 |
|
57 | 79 | Before running the tests you will have to build your app for the platform on test or both. Navigate to your demo app folder from where you will execute the commands that follow.
|
58 | 80 |
|
@@ -80,7 +102,7 @@ $ npm run e2e -- --runType sim.iPhone8.iOS110
|
80 | 102 |
|
81 | 103 | Generated tests are standard [Mocha](http://mochajs.org) tests.
|
82 | 104 |
|
83 |
| -## <a name='customCapabilities'></a>Custom Appium Capabilities |
| 105 | +## Custom Appium Capabilities |
84 | 106 |
|
85 | 107 | When installed, the plugin creates `e2e` folder containing sample test file and configuration folder `config` where your custom capabilities reside.
|
86 | 108 | The existence of such capabilities is a runner's requirement which comes from [Appium](https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md). Additional locations where the runner will search for the config file are:
|
@@ -109,7 +131,7 @@ Thus, the same configuration can be used by both apps without duplication of fil
|
109 | 131 |
|
110 | 132 | If you wish to use another location of the capapabilities file instead default ones, you can specify it with `--capsLocation` option. Remember that the path provided has to be relative to the root directory.
|
111 | 133 |
|
112 |
| -Notice that once custom capabilities are provided you will be able to pick any of them using the `--runType` option (e.g. `--runType android25`). Sample content of `appium.capabilities.json` file could be: |
| 134 | +Notice that once custom capabilities are provided you will be able to pick any of them using the `--runType` option (e.g. `--runType android25`). See sample content of `appium.capabilities.json` file below. For more details regarding the Appium Capabilities read [Appium documentation about Desired Capabilities](https://appium.io/docs/en/writing-running-appium/caps/): |
113 | 135 |
|
114 | 136 | ```
|
115 | 137 | {
|
@@ -146,7 +168,7 @@ As you can see, the `app` property can be left an empty string which will force
|
146 | 168 |
|
147 | 169 | **It is important to build your app in advance as explained in [Usage](#usage) section, because the runner expects to provide app package to it or such to exists in the search location.**
|
148 | 170 |
|
149 |
| -## <a name='options'></a>Options |
| 171 | +## Options |
150 | 172 |
|
151 | 173 | |Option| Description | Value |
|
152 | 174 | |---|---|---|
|
@@ -186,9 +208,17 @@ $ npm run e2e -- --runType android25 --verbose
|
186 | 208 | ## Common Problems
|
187 | 209 |
|
188 | 210 | 1. Missing installed appium
|
189 |
| -2. Missleading appPath or capabilities location. Please make sure that the path to the app or capabilities location is correct. |
| 211 | +2. Misleading appPath or capabilities location. Please make sure that the path to the app or capabilities location is correct. |
190 | 212 |
|
191 | 213 |
|
192 | 214 | ## Missing Features
|
193 | 215 |
|
194 | 216 | 1. Faster developer turnaround when working on an app. Find a way to use livesync and kick off Appium tests for the app that's on the device already.
|
| 217 | + |
| 218 | +## Contribute |
| 219 | +We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md). If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-dev-appium/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). |
| 220 | + |
| 221 | +## Get Help |
| 222 | +Please, use [github issues](https://github.com/NativeScript/nativescript-dev-appium/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-features). For general questions and support, check out the [NativeScript community forum](https://discourse.nativescript.org/) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation). |
| 223 | + |
| 224 | + |
0 commit comments