2018-03-23 14:26:11 +00:00
|
|
|
# React Native Firebase - Testing Project
|
2018-03-23 13:40:07 +00:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
* Make sure you have Xcode installed (tested with Xcode 8.1-8.2).
|
2018-03-23 14:26:11 +00:00
|
|
|
* make sure you have node installed (`brew install node`, node 7.6.0 and up is required.
|
2018-03-23 13:40:07 +00:00
|
|
|
* Make sure you have react-native dependencies installed:
|
|
|
|
* react-native-cli is installed (`npm install -g react-native-cli`)
|
|
|
|
* watchman is installed (`brew install watchman`)
|
2018-03-23 14:26:11 +00:00
|
|
|
* [appleSimUtils](https://github.com/wix/AppleSimulatorUtils)
|
|
|
|
* detox-cli `npm install -g detox-cli`
|
2018-03-23 13:40:07 +00:00
|
|
|
|
|
|
|
### Step 1: Npm install
|
|
|
|
|
|
|
|
* Run `npm install`.
|
|
|
|
|
|
|
|
## To test Release build of your app
|
|
|
|
|
|
|
|
### Step 2: Build
|
|
|
|
|
|
|
|
* Build the demo project
|
|
|
|
|
|
|
|
```sh
|
|
|
|
detox build --configuration ios.sim.release
|
|
|
|
```
|
|
|
|
|
|
|
|
### Step 3: Test
|
|
|
|
|
|
|
|
* Run tests on the demo project
|
|
|
|
|
|
|
|
```sh
|
|
|
|
detox test --configuration ios.sim.release
|
|
|
|
```
|
|
|
|
|
|
|
|
This action will open a new simulator and run the tests on it.
|
|
|
|
|
|
|
|
## To test Debug build of your app
|
|
|
|
|
|
|
|
### Step 2: Build
|
|
|
|
|
|
|
|
* Build the demo project
|
|
|
|
|
|
|
|
```sh
|
|
|
|
detox build --configuration ios.sim.debug
|
|
|
|
```
|
|
|
|
|
|
|
|
### Step 3: Test
|
|
|
|
|
|
|
|
* start react-native packager
|
|
|
|
|
|
|
|
```sh
|
|
|
|
npm run start
|
|
|
|
```
|
|
|
|
|
|
|
|
* Run tests on the demo project
|
|
|
|
|
|
|
|
```sh
|
|
|
|
detox test --configuration ios.sim.debug
|
|
|
|
```
|
|
|
|
|
|
|
|
This action will open a new simulator and run the tests on it.
|