Appium end-to-end tests for Status app

From Status Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

Installation:

Local Running:

  • Start Appium (just type appium in terminal and press enter)
  • Start two virtual devices and wait for them to boot
  • Go to /status-react/test/appium/tests and run:
     python3 -m pytest -m all -v --env=local --apk=/<path to apk>/apk_name.apk 
  • Running with "-m all" starts all tests, if you want to start a specific test group, you can use "-m transaction" or "-m chat" instead of "-m all". Additional groups will be added after adding more tests.

Running with PyCharm:

NOTE: you may not see Python 3.6 in your Interpreter list. No worries! Staying on the same screen click Show all -> click '+' then 'add local' on next screen -> System Interpreter -> Select Python 3.6

  • Configure Python Integrated tools: go to PyCharm -> Preferences-> cdm+ -> Add Integrated tools to search conditions into search bar -> select Python Integrated tools -> Select py.test
  • Go to Appium directory and find pytest.ini file. Add the following line (it is already there, all you need is to add your own path to apk), so for example i have 1.apk in tests folder:
addopts = -s -v --junitxml=result.xml --tb=line --env=local --apk=/Users/in_no_cent/Documents/Status/status-react/test/appium/tests/1.apk --log=True
  • Start Appium, run 2 devices in Genymotion, then select any test you like -> Right click -> Run (tests are started with test_)
  • Enjoy :)