You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-16
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ A package to help with writing and executing e2e [Appium](http://appium.io) test
5
5
<!-- TOC depthFrom:2 -->
6
6
7
7
-[Requirеments](#requirеments)
8
-
-[Set Up](#set-up)
8
+
-[Setup](#setup)
9
9
-[Structure](#structure)
10
10
-[Files Preview](#files-preview)
11
11
-[Usage](#usage)
@@ -24,24 +24,44 @@ A package to help with writing and executing e2e [Appium](http://appium.io) test
24
24
25
25
The `nativescript-dev-appium` plugin requires:
26
26
* 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)
27
28
* latest version of [Xcode](https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html)
28
29
*[Android SDK Tools](https://developer.android.com/studio/releases/sdk-tools.html) version greater than 25.3.0
29
30
30
-
## Set Up
31
+
## Setup
31
32
32
-
Add the plugin as a `devDependency` to your project:
33
+
Add the plugin as a *devDependency* to your project:
33
34
34
35
```shell
35
36
$ npm install -D nativescript-dev-appium
36
37
```
37
38
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
+
38
41
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:
39
42
40
43
```shell
41
44
$ npm install -g appium
42
45
```
43
46
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.
45
65
46
66
### Structure
47
67
@@ -58,37 +78,37 @@ After completion of the installation, if your project has a dependency to *TypeS
58
78
├── package.json
59
79
├── tsconfig.json
60
80
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" ]`.
|`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:
|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:
74
94
> *`e2e/reports` - this folder is created during test execution and stores the actual images from comparison
75
95
> *`e2e/resources` - this folder aims to store the expected images for comparison
76
96
77
97
## Usage
78
98
79
99
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.
80
100
81
-
```
101
+
```shell
82
102
$ tns build android
83
103
```
84
104
85
105
or
86
106
87
-
```
107
+
```shell
88
108
$ tns build ios
89
109
```
90
110
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.
0 commit comments