Skip to content

monicadanesa/robotframework-mykonos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyKonos

RobotFramework - Mykonos

Introduction

Mykonos is a complete test automation tools for Android Device using Robot Framework and UI Automator (Python), it easy to learn because Mykonos use BDD syntax to write the test cases.

Prerequisites

  • Download and Install Python3 Python
  • Install latest Robot framework latest base on the guidance Robotframework

Installation

 pip install mykonos

Usage

  • Download and Install the android emulator base on the guidance Genymotion or Android Emulator.
  • Make sure emulator is available by checking with adb devices, for more detail info please check the adb command on ADB Shell guidance.
  • Make sure Robot Framework is able to run by execute robot --version and it will get Robot Framework version as a result.
  • Create a file (sample.robot).
  • Import Mykonos Library on the Robot Framework Test Suite.
  • Write test case base on Robot Framework guidance.

Code Example

Below is the sample test case for testing an Application Messaging (sample.robot).

*** Settings ***
Library                                           mykonos

*** Variables ***
${activity_apk}                                   com.android.messaging/com.android.messaging.ui.conversationlist.ConversationListActivity
${apk}                                            com.android.messaging
${sender_number}                                  0812345678
${message}                                        helllo
${emulator}                                       192.168.56.131:5555

*** keywords ***
Open Application
    Open App                                        devices_parallel=${emulator}     package=${activity_apk}

Click Icon Message
    Click Element                                   text=Messaging    devices_parallel=${emulator}

Click Icon New Message
    Click Element                                   resourceId=com.android.messaging:id/start_new_conversation_button   devices_parallel=${emulator}

Input Phone Number
    [Arguments]                                     ${input_phonenumber}
    Input Text                                      text=To    devices_parallel=${emulator}   input=${input_phonenumber}

Press Enter
    Press Keycode                                   keys=enter     devices_parallel=${emulator}

Input Message
    [Arguments]                                     ${input_message}
    Input Text                                      className=android.widget.EditText   devices_parallel=${emulator}   input=${input_message}

Click Send Message
    Click Element                                   resourceId=com.android.messaging:id/send_message_button    className=android.widget.ImageButton      devices_parallel=${emulator}

Close Application
    Close App                                       package=${apk}      devices_parallel=${emulator}

*** Test Cases ***
Test Case Input Phone Number on Application Messaging
    Open Application
    Click Icon New Message
    Input Phone Number                              ${sender_number}
    Press Enter
    Input Message                                   ${message}
    Click Send Message
    Close Application

Run The Test

Run the test case by execute robot sample.robot on your terminal.

Documentation Detail

Mykonos Documentation

Contribution

  • Forks repo and clone to your local computer.
  • Checkout the source code from development branch.
  • Modified, create unit test and make sure the code is running well on local.
  • Commit and pull request the changes to development branch.

Contributors

Credit

Thanks to uiautomator's and thewife author to inspire us to make this library.

About

Robot Framework Mobile Test Automation using UIAutomator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •