Skip to content

Commit ad152bd

Browse files
committed
docs: add external dependencies to setup
1 parent 3c76ea1 commit ad152bd

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

README.md

+36-16
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A package to help with writing and executing e2e [Appium](http://appium.io) test
55
<!-- TOC depthFrom:2 -->
66

77
- [Requirеments](#requirеments)
8-
- [Set Up](#set-up)
8+
- [Setup](#setup)
99
- [Structure](#structure)
1010
- [Files Preview](#files-preview)
1111
- [Usage](#usage)
@@ -24,24 +24,44 @@ A package to help with writing and executing e2e [Appium](http://appium.io) test
2424

2525
The `nativescript-dev-appium` plugin requires:
2626
* latest version of [Appium](https://github.com/appium/appium/releases)
27+
* for correct functioning of the [XCUITest](https://github.com/appium/appium/blob/master/docs/en/drivers/ios-xcuitest.md) driver for iOS, additional libraries are required (see the [Setup](#setup) section)
2728
* latest version of [Xcode](https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html)
2829
* [Android SDK Tools](https://developer.android.com/studio/releases/sdk-tools.html) version greater than 25.3.0
2930

30-
## Set Up
31+
## Setup
3132

32-
Add the plugin as a `devDependency` to your project:
33+
Add the plugin as a *devDependency* to your project:
3334

3435
```shell
3536
$ npm install -D nativescript-dev-appium
3637
```
3738

39+
> 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.
40+
3841
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:
3942

4043
```shell
4144
$ npm install -g appium
4245
```
4346

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.
47+
Install external dependencies of [XCUITest](https://github.com/appium/appium-xcuitest-driver/blob/master/README.md#external-dependencies) driver for iOS via:
48+
49+
* [Homebrew](https://brew.sh):
50+
51+
```shell
52+
$ brew install carthage
53+
$ brew install libimobiledevice --HEAD
54+
$ brew install ideviceinstaller
55+
$ brew install ios-webkit-debug-proxy
56+
```
57+
58+
* [NPM](https://www.npmjs.com/):
59+
60+
```shell
61+
$ npm install -g ios-deploy
62+
```
63+
64+
> For detailed information on external dependencies, please, refer to the [XCUITest](https://github.com/appium/appium-xcuitest-driver/blob/master/README.md#external-dependencies) repository.
4565
4666
### Structure
4767

@@ -58,37 +78,37 @@ After completion of the installation, if your project has a dependency to *TypeS
5878
├── package.json
5979
├── tsconfig.json
6080

61-
> Note - To avoid any incompatibilities between the source of `e2e` tests (ES6) and the source of the application (ES5), we recommend to exclude the `e2e` folder from the application's `tsconfig.json` file: `exclude": [ "e2e" ]`.
81+
> To avoid any incompatibilities between the source of *e2e* tests (ES6) and the source of the application (ES5), we recommend to exclude the *e2e* folder from the application's *tsconfig.json* file: `exclude": [ "e2e" ]`.
6282
6383
### Files Preview
6484

6585
|File |Purpose|
66-
|:-------------------------------:|:-------------------:|
67-
|`config/appium.capabilities.json`|Contains predefined configurations for test execution.|
68-
|`config/mocha.opts` |A default mocha configuration file. |
69-
|`sample.e2e-test.ts` |Contains a predefined ready-to-execute sample tests of the default [*hello-world*](https://github.com/NativeScript/template-hello-world-ts) template.|
70-
|`setup.ts` |Defines the `before` and `after` test execution hooks responsible to start and stop the [Appium](http://appium.io/) server.|
71-
|`tsconfig.json` |TypeScript compiler configuration file for the `e2e` tests.|
72-
73-
> Note - The folders below are related to the image comparison feature:
86+
|:-----------------------------:|:-------------------:|
87+
|config/appium.capabilities.json|Contains predefined configurations for test execution.|
88+
|config/mocha.opts |A default mocha configuration file. |
89+
|sample.e2e-test.ts |Contains a predefined ready-to-execute sample tests of the default [hello-world-ts](https://github.com/NativeScript/template-hello-world-ts) template.|
90+
|setup.ts |Defines the `before` and `after` test execution hooks responsible to start and stop the [Appium](http://appium.io/) server.|
91+
|tsconfig.json |TypeScript compiler configuration file for the `e2e` tests.|
92+
93+
> Note - the folders below are related to the image comparison feature:
7494
> * `e2e/reports` - this folder is created during test execution and stores the actual images from comparison
7595
> * `e2e/resources` - this folder aims to store the expected images for comparison
7696
7797
## Usage
7898

7999
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.
80100

81-
```
101+
```shell
82102
$ tns build android
83103
```
84104

85105
or
86106

87-
```
107+
```shell
88108
$ tns build ios
89109
```
90110

91-
The command that will run the tests should specify the targeted platform using the `runType` option as shown below. This way a capabilities will be selected from the [capabilities config file](#customCapabilities).
111+
The command that will run the tests should specify the targeted platform using the `runType` option as shown below. This way a capabilities will be selected from the [capabilities](#custom-appium-capabilities) configuration file.
92112

93113
```
94114
$ npm run e2e -- --runType android25

0 commit comments

Comments
 (0)