Академический Документы
Профессиональный Документы
Культура Документы
July 2015
Version 1.00
Printed and downloaded copies of this document are not controlled and may be
used as reference documents only. Any copies should be checked for accuracy
against the master document on Sharepoint.
©2015 ZIH Corp and/or its affiliates. All rights reserved. Zebra and the stylized
Zebra head are trademarks of ZIH Corp., registered in many jurisdictions
worldwide. All other trademarks are the property of their respective owners.
iProtect Status: Zebra Technologies Confidential – Do Not Redistribute
http://www.apache.org/licenses/LICENSE-2.0
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Document Revisions
Version
Date Document Changes
Number
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Table of Contents
1 Introduction ................................................................................................................................................................
1.1 .....Scope and Purpose ................................................................................................................................................................
1.2 .....System Requirements ..........................................................................................................................................................
2 Installation...................................................................................................................................................................
2.1 .....Installing Python ...................................................................................................................................................................
2.1.1 Installation of Python: .................................................................................................................................................................
2.1.2 Setting up path variables for Python:...................................................................................................................................
2.2 .....Installation of Robot Framework ..................................................................................................................................
3 Test suite template..................................................................................................................................................
4 Commands to run Automation .........................................................................................................................
5 Preconditions before executing corresponding Test plans…………………………………………....
5.1…..Data Wedge……………………………………………………………………………………………………………………...
5.2…..Readiness…………………………………………………………………………………………………………………………
5.2…..EHS………………………………………………………………………………………………………………………………….
5.2…..QFE-AndroidCompliance…………………………………………………………………………………………………..
5.2…..MX-MDM………………………………………………………………………………………………………………………….
5.3…..OOB………………………………………………………………………………………………………………………………….
7 Appendices………………………………………………………………………………………………………………………
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
1 Introduction
1.1 Scope and Purpose
Robot Framework is a Python-based, extensible keyword-driven test
automation framework for end-to-end acceptance testing and acceptance-
test-driven development (ATDD). It can be used for testing distributed,
heterogeneous applications, where verification requires touching several
technologies and interfaces, extended with our EMAAF Library
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
2 Installation
Robot Framework is supported on Python, Jython (JVM)
and IronPython (.NET) and runs also on PyPy. The interpreter you want to
use should be installed before installing the framework.
2.1 Installing Python
Robot Framework currently supports Python versions 2.5, 2.6, and 2.7.
2.1.1 Installation of Python:
Download Python 2.7 and Run executable file as administrator.
On Windows you can configure PATH by following the steps below. Notice that
the exact setting names may be different on different Windows versions, but
the basic approach should still be the same.
1. Open Start > Settings > Control Panel > System > Advanced >
Environment Variables.There are User variables and System
variables, and the difference between them is that user variables affect
only the current users, whereas system variables affect all users.
2. To edit an existing PATH value, select Edit and
add ;<InstallationDir>;<ScriptsDir> at the end of the value
(e.g. ;C:\Python27;C:\Python27\Scripts). Note that the semicolons (;)
are important as they separate the different entries. To add a
new PATH value, select New and set both the name and the value, this time
without the leading semicolon.
3. Exit the dialog with Ok to save the changes.
4. Start a new command prompt for the changes to take effect.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
2.2 Installation of Robot Framework
Download RF from the link ROBOT and
Right click on robotframework-2.8.7.win-amd64.exe and Run as administrator
Click on Run as shown below.
Click on “Next”
Click on “Next” and Make sure that Robot detected the Python Installation Directory
Click “Next”
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Click “Finish”
Robot Framework installed successfully.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Now , execute following command to merge EMAAF Library into Robot Framework.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Now you are ready to run Automation using Robot Framework with our EMAAF Library
| *Setting* |
| Library | emaaflib |
| Force Tags | Regression Level |
| *Variable* |
| ${PRIMARYDEVICE} |
| ${SECONDARYDEVICE1} |
| ${SECONDARYDEVICE2} |
| ${SECONDARYDEVICE3} |
| @{SUPPORTINGDEVICES} | ${SECONDARYDEVICE1} | ${SECONDARYDEVICE2} | ${SECONDARYDEVICE3} |
| ${HOSTPATH} |
| ***Test Cases*** |
| Test case Id | [Documentation] | Test Case-Number Followed by Case Descrption|
| | setTestCaseId | VT244-0001 |
| | LAUNCH_APP | Settings |
| | SLEEP | 1 |
| *Keywords* |
| Init EMAAF Setup |
| | ConnectDevice1 | ${PRIMARYDEVICE} |
| | SetEmaafPath | ${HOSTPATH} |
| | EmaafSetup | ${HOSTPATH} |
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
To run particular test case from the test suite: pybot –t VTID -v
PRIMARYDEVICE:DEVICE_ID -v HOSTPATH:PATH_CONTAINS_TESTFILES
TEST_SUITENAME
Please make sure all the commands are executing from the path where the test suite
located, otherwise you can mention the path in place TEST_SUITENAME including the test
suite name.
Notes:
PATH_CONTAINS_TESTFILES : Path from where Robot Framework fetch files required for
the test execution Eg. “C:\Users\xxxx\Desktop\MC40\Merged\R1andR2\eMaafFiles”
TEST_SUITENAME: test suite name which you are going to run automation or path for the
test suite
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
5 Preconditions before Executing corresponding Test plans
Download Automation dependencies and corresponding Test suites from the link:
AutomationDependency.zip
Preconditions:
1. Barcode Display utility must be installed on the PC.
2. All the barcodes required should be present in the PC.
3. The DW folder which contains all the required files to run the Data wedge
automation should be present inside the host folder.
4. All the required APK present inside the DW folder must be installed on the
Device.(Can be done by running the installApp.bat)
5. Please make sure all the applications in the batch file are installed properly
before starting execution.
6. Host folder should be till e.g.
“C:\Users\xxxx\Desktop\AutomationDependency\DW”
Steps:
1. Launch the Barcode Display Utility.
2. Under General settings browse and select the folder where the barcodes are
located.
3. Under Connection Settings set DUT IP as 127.0.0.1 and net port as 1000.
4. Click on the Start Button and a message “Waiting for connection” will be seen
under Message.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Preconditions:
1. The Readiness folder which contains all the required files to run the
Readiness automation should be present inside the host folder.
2. Host path should be till e.g.
“C:\Users\xxxx\Desktop\AutomationDependency\”
5.3 EHS
Preconditions:
1. The EHS folder which contains all the required files to run the EHS
automation should be present inside the host folder.
2. Host path should be till e.g.
“C:\Users\xxxx\Desktop\AutomationDependency\”
Steps:
1. Factory reset the DUT
2. Launch Settings and enable the following options:
a. Developer options
i. (i)USB debugging
ii. (ii)Stay awake
b. Security
i. Screen Lock: None
3. On DUT, Install the latest EHS.apk
4. Press Home, Select EHS and Always
5. 5. Go to preferences in EHS admin mode and disable the “USB debugging
disabled” option
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
5.4 QFE Android Compliance
Preconditions:
1. The AndroidCompliance folder which contains all the required files to run
the QFE automation should be present inside the host folder.
2. Host path should be till e.g.
“C:\Users\xxxx\Desktop\AutomationDependency\”
Steps:
1. Factory reset the DUT
2. Launch Settings and enable the following options:
Developer options:
(i)USB debugging
(ii)Stay awake
Security
(i)Screen Lock: None
1. On Primary DUT, Connect to some Profile with Internet access
2. For Moonlight devices: Connect one secondary device
3. For running DataWedge test cases, please follow the below mentioned steps:
6. Under Connection Settings set DUT IP as 127.0.0.1 and net port as 1000.
7. Click on the Start Button and a message “Waiting for connection” will be seen
under Message.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
5.5 MX-MDM
Preconditions:
1. The MX folder which contains all the required files and sub folders to run the
MX automation should be present inside the host folder.
2. Host path should be till e.g.
“C:\Users\xxxx\Desktop\AutomationDependency\”
Steps:
1. Factory reset the DUT
2. Launch Settings and enable the following options:
Developer options:
(i)USB debugging
(ii)Stay awake
Copy music 2 music files into Enterprise partition or sdcard on the device.
3. Edit the corresponding device serial number in the push_cert.bat , if you
connect more than one device on your desktop.
4. Run push_cert.bat by double clicking on it.
5. Check whether the corresponding certificate installed or not on the device,
you can check the same by opening Results.xml inside Certs folder
6. Run the command from the command line where the test suite is placed.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
5.5 OOB
Preconditions:
1. The “OOB” and “Readiness” folder which contains all the required files to run the OOB
test plan automation should be present inside the host folder.
Steps:
1. Factory reset the DUT
2. Launch Settings and enable the following options:
Developer options:
(i)USB debugging
(ii)Stay awake
Security
(i)Screen Lock: None
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
Note: If you are re running MX-MDM failed test cases using RF please make
sure all the preconditions would have as a fresh run.
Report.html shows the summary of the test plans ran and the consolidated result with an
appropriate background color.
For e.g. Green for 100% pass and Red if there are any failures as shown below.
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
To analyze the failures click on the LOG to get the detailed execution steps and failure
report analysis.
For each failed test case, you can observe a screenshot followed by logcat logs in the
log.html as shown below:
All the screenshots and log files can be found at the host path specified while starting the
execution.
For example, C:\Users\xxx\Desktop\Auomation\ is your host path then your failure data
will be C:\Users\xxx\Desktop\Auomation\DEVICE_ID\TestCase_ID
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use
Robot Framework USER GUIDE
If anybody wants to know the results during the execution please add the command line
argument before test suite name as “–b Results.html”.
This is a debug file from Robot Framework to know the results at the runtime.
7 Appendices
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html
©2015 ZIH Corp All rights reserved. Zebra Technologies Confidential – Do Not
Redistribute
Unless marked otherwise, printed copies are uncontrolled – Verify current revision before use