Skip to content

Commit

Permalink
Updated Guide.Contributing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rotemmiz committed Jan 8, 2018
1 parent d93d984 commit 6d66fb9
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions docs/Guide.Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ lerna run build

### Testing

### 1. Unit tests

```sh
lerna run test
```
Expand All @@ -72,34 +74,43 @@ cd detox
open coverage/lcov-report/index.html
```

### Running Detox e2e covarage tests
### 2. Running Detox e2e coverage tests
Detox has a suite of e2e tests to test its own API while developing (and for regression). The way we do is is by maintaining a special application that is "tested" against Detox's API, but essentially, it's the API that is tested, not the app.
To run the e2e tests, go to `detox/detox/test`

```sh
cd detox/test
```

To build the application (if you already ran `lerna run build` you're covered)

```sh
npm run build
```

To run the e2e tests, after the application was built.

#### iOS
```sh
npm run build:ios
npm run e2e:ios
```

### Android Native tests
#### Android
```sh
npm run build:android
npm run e2e:android
```

### 3. Android Native tests

0. Install Java and Android SDK 25
1. In `detox/android` run `./gradlew install`
2. Run `./gradlew test` to run the tests
1. In `detox/android` run `./gradlew install` run

```sh
./gradlew test
```

### Code Generation
### 4. Code Generation

We are using a code generator based on `babel` and `objective-c-parser` to generate a Javascript Interface for `EarlGrey` (the testing library we use on iOS).
This interface allows us to call Objective-C methods through the WebSocket connection directly on the testing device.
Expand Down

0 comments on commit 6d66fb9

Please sign in to comment.