An example of how you can automate mobile device testing in Python using a framework Appium. The sample app is being used as a test app todo is available on GitHub.
First, install the dependencies:
pip install -r requirements.txt
We run the make start
command to create the .env
file that needs to be populated and the settings.json
file.
make start
Run the tests with the following command:
python3 main.py
You can also run tests with the make run
command
make run
SimpleAutoTestUI/
├── asset/
│ └── ...
├── src/
│ ├── locators/
│ │ └── ...
│ ├── pages/
│ │ └── ...
│ ├── tests/
│ │ └── ...
│ └── utils/
│ │── ...
│ └── ...
└── main.py
The directory where the resources (such as images) are located.
The directory that contains the project's source code. It includes several subdirectories:
- locators/ - This directory contains files with interface element locators (for example, identifiers, names, paths).
- pages/ - This directory contains files that represent each screen of the application.
- tests/ - This directory contains tests.
- utils/ - This directory contains auxiliary files and modules.
main project file.