-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instruction on how to add a test and how to execute
- Loading branch information
1 parent
a304fc9
commit d3e745b
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# How to add a test | ||
|
||
1. Create a feature file `(rn-tester-e2e/test/features)` - GivenWhenThen Gherkin syntax | ||
2. **OPTIONAL -** Create a screen object or extend the existing one (depends on the test scope) - `rn-tester-e2e/test/screenObjects` - map screen elements for iOS and Android | ||
3. Create a step file `(rn-tester-e2e/test/steps)` - import used screen objects, create execution code of GivenWhenThen steps from feature file | ||
4. Create a runner file `(rn-tester-e2e/test/runners)` - import steps from step3 and create test scenarios | ||
|
||
# How to execute a test | ||
1. Open new Terminal -> navigate to the react-native path -> open Metro by typing | ||
>yarn start | ||
or | ||
|
||
>npm start | ||
|
||
2. Open second terminal -> navigate to the react-native/packages/rn-tester-e2e -> MAKE SURE YOUR APPIUM HAS UIAUTOMATOR2 AND XCUITEST INSTALLED! type | ||
>appium --base-path /wd/hub | ||
3. Open third terminal -> navigate to the react-native/packages/rn-tester-e2e -> run all tests by typing | ||
>npm run ios | ||
or | ||
|
||
>npm run android |