Example of how I'm currently using py.test with tests written with Appium modeled closely to Mozilla's WebQA framework.
You can clone this repo and run the example tests provided -- test iOS app is provided by the Appium Python Client project. You'll need to make sure that you set up your environment properly using the Appium documentation.
conftest.py
holds the Appium driver setup/teardown using py.test fixtures
/app
:
TestApp.app.zip
is a test iOS app
/screens
:
screen.py
contains custom helpers for Appium that can apply to any Appium projectbase.py
extendsscreen.py
and includes general locators that aren't specific to any screen in your appcalculator.py
andmap.py
represent individual screens in the app that extendsbase.py
. These files include the locators and specific functions that apply to each
/tests
:
test_something.py
contains the tests and is marked to use thedriver_setup
fixture defined inconftest.py