This is a template for make mobile tests using Robot Framework creating tests suite.
- Python 3
- Appium Server
- Install Appium Server
npm install appium -g
- Install Appium Doctor
npm install appium-doctor -g
- Verify requirements in iOS
appium-doctor --ios
- Verify requirements in android
appium-doctor --android
- Install requirements not present on your computer to run automation on your emulator
- Appium Desktop
- Robot Framework
or
pip install robotframework
pip3 install robotframework
- Appium Library For Robot
or
pip install --upgrade robotframework-appiumlibrary
pip3 install --upgrade robotframework-appiumlibrary
- Go to config folder and run:
cp env.example.robot env.robot
- Configure Enviroments Variables
- To Get UDID in MacOS
instruments -s
Ps.: The build to run tests in iPhone Emulator is different from the used in the device.
- Configure env file
- Insert .app/.ipa (iOS) or .apk (Android) in app directory
- Open original App project and Run Metro Bundler
yarn start
- Configure env file
- Insert .app/.ipa (iOS) or .apk (Android) in app directory
- Run your all tests
robot -d ./logs tests
- Run your test by feature test suite
robot -d ./logs tests/feature_name
- Run your test by specific feature test suite
robot -d ./logs tests/feature_name/suite.robot
- Run yours tests using
-d ./logs
for organize log files. - Not remove env.example file.
- Update your Commons file according to your need.
Below is a list of the files by directory.
Directory | Files in folder |
---|---|
app |
ios or android File to run your tests (apk, ipa or app). |
config |
env.robot All files used to configure your Robot tests such as desired capabilities. |
logs |
log.html Test reports in html, and screenshots. |
src/components |
components.robot All components of the application used in tests. |
src/libs |
lib_name.py All Python files used to provide support in tests. |
src/pages |
page_name.robot All pages of the application using Page Object Pattern. |
src/tests |
base.robot Import of the files used in tests and base of the execution test cases. |
src/tests/<feature-name> |
suite_tests_name.robot Execution test cases. |
Contributions are what make the open source community an incredible place to learn, inspire and create. Any contribution you make will be much appreciated.
- Make a project Fork
- Create a Branch for your feature (
git checkout -b feature/amazing-feature
) - Insert your changes (
git add .
) - Make a commit with your changes (
git commit -m 'feat(package-filename>): Inserting a Amazing Feature !
) - Push the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Distributed under the MIT license. See LICENSE
for more information.
Yury Alencar - Github - yuryalencar19@gmail.com