From d49a2578b27049518e2121832d75f9ccf390d115 Mon Sep 17 00:00:00 2001 From: Gustavo Nunes Date: Fri, 27 Jan 2017 02:21:25 -0200 Subject: [PATCH] Update UI testing docs --- docs/contributing/testing-and-feedback.md | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/contributing/testing-and-feedback.md b/docs/contributing/testing-and-feedback.md index ab9574f..7cfbcfd 100644 --- a/docs/contributing/testing-and-feedback.md +++ b/docs/contributing/testing-and-feedback.md @@ -6,17 +6,27 @@ Please try to be as descripive as possible. ## For Developers -To run appium tests: +### UI (Appium) tests -1. install appium `npm install -g appium` -2. start appium server in new tab `appium &` -3. start application on emulator or real device -4. run tests `lein test` +To run the tests: -To run unit tests execute: +1. Install appium: run `npm install -g appium` +2. Start application on emulator or real device ([more details here](https://wiki.status.im/contributing/development/building-status/#build-and-test)) +3. Start appium server in new tab: run `appium --session-override` +4. Run `lein test` + +Hints / Gotchas: + +- Confirmed working using Appium version 1.6.1. +- To find an element easily in the tests, use the `:accessibility-label` property in the respective Reagent component. +- When querying an element by its inner text, be sure to use the whole text that the element is supposed to contain (it won't match just a part of the text). + +### Unit tests + +To run the unit tests execute: `lein doo node test once` or `lein doo node test` -Second command will watch files inside `src` and `test` folders and rerun on changes. \ No newline at end of file +Second command will watch files inside `src` and `test` folders and rerun on changes.