Skip to content

This is a template for make Mobile tests using the Appium, and Robot Framework creating a tests suite.

License

Notifications You must be signed in to change notification settings

yuryalencar/mobile_test_automation_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Template for Create and Run Mobile tests using Robot Framework.

Table of Contents

About Project

This is a template for make mobile tests using Robot Framework creating tests suite.

Starting

Requirements

  1. Python 3
  2. 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
  3. Appium Desktop
  4. Robot Framework
    pip install robotframework
    
    or
    pip3 install robotframework
    
  5. Appium Library For Robot
    pip install --upgrade robotframework-appiumlibrary
    
    or
    pip3 install --upgrade robotframework-appiumlibrary
    

Installation

  1. Go to config folder and run:
cp env.example.robot env.robot
  1. Configure Enviroments Variables
  • To Get UDID in MacOS
    instruments -s
    

Languages used

How To Use

Ps.: The build to run tests in iPhone Emulator is different from the used in the device.

Preconditions (React Native)

  1. Configure env file
  2. Insert .app/.ipa (iOS) or .apk (Android) in app directory
  3. Open original App project and Run Metro Bundler
yarn start

Preconditions (Flutter)

  1. Configure env file
  2. Insert .app/.ipa (iOS) or .apk (Android) in app directory

Run Tests

  1. Run your all tests
robot -d ./logs tests
  1. Run your test by feature test suite
robot -d ./logs tests/feature_name
  1. Run your test by specific feature test suite
robot -d ./logs tests/feature_name/suite.robot

Best Pratices

  1. Run yours tests using -d ./logs for organize log files.
  2. Not remove env.example file.
  3. Update your Commons file according to your need.

Files by directories

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.

How mobile tests work?

How work

Contributing

Contributions are what make the open source community an incredible place to learn, inspire and create. Any contribution you make will be much appreciated.

  1. Make a project Fork
  2. Create a Branch for your feature (git checkout -b feature/amazing-feature)
  3. Insert your changes (git add .)
  4. Make a commit with your changes (git commit -m 'feat(package-filename>): Inserting a Amazing Feature !)
  5. Push the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

Distributed under the MIT license. See LICENSE for more information.

Contact

Yury Alencar - Github - [email protected]

About

This is a template for make Mobile tests using the Appium, and Robot Framework creating a tests suite.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published