View on GitHub

Robot-AppEyes

Robot Framework Visual Verification Test Library using Applitools Eyes

Download this project as a .zip file Download this project as a tar.gz file

Robot-AppEyes library for Robot Framework

Introduction

Robot-AppEyes is a Robot Framework Library to automate visual software testing verification. Robot-AppEyes uses a Python SDK called Eyes-Selenium from the tool Applitools Eyes, and can be used with the Selenium2Library.

The Robot-AppEyes library is the result of our work with Applitools Eyes. In order to use the Robot-AppEyes library, you are required to sign up for a free account with Applitools. See the Usage section.

Requirements

Installation

Using pip

The recommended installation tool is pip.

Install pip. Enter the following:

pip install Robot-AppEyes

Append --upgrade to update both the library and all its dependencies to the latest version:

pip install --upgrade Robot-AppEyes

To install a specific version enter:

pip install Robot-AppEyes==(DesiredVersion)

Manual Installation

To install Robot-Appeyes manually, install all dependency libraries before installing Robot-AppEyes.

1) Install Robot Framework installed.

2) Download source distributions (*.tar.gz / *.zip) for the library and its dependencies.

Eyes-selenium dependencies:

3) Extract each source distribution to a temporary location using 7zip (or your preferred zip program).

4) Open command line and go to each directory that was created from extraction and install each project using:

   python setup.py install

Uninstall

To uninstall Robot-AppEyes use the following pip command:

pip uninstall Robot-AppEyes

However, if the package was installed manually it will need to be uninstalled manually:

1) Navigate to C:\Python27\Tests and delete RobotAppEyesTest.txt, pictureOne.png, pictureTwo.png and RobotAppEyes-KeywordDocumentation.html

2) Navigate to C:\Python27\Lib\site-packages and delete RobotAppEyes-1.2-py2.7.egg-info and the folder RobotAppEyes

Directory Layout

RobotAppEyes/RobotAppEyes.py : The Robot Python Library that makes use of the Applitools Eyes Python SDK.

Tests/acceptance/RobotAppEyesTest.txt : Example test file to display what various keywords from Robot-AppEyes Library accomplish

doc/RobotAppEyes-KeywordDocumentation.html : Keyword documentation for the Robot-AppEyes library.

Usage

To write tests with Robot Framework and Robot-AppEyes, RobotAppEyes must be imported into your Robot test suite. See Robot Framework User Guide for more information.

Note - You must create a free account with Applitools in order to run the Robot-AppEyes library and return results. The Applitools site will allow you to sign up and you will then be provide with your own API key. This will then need to be added to the Robot test file RoboAppEyesTest.txt, within the variable ${Applitools-Key}, remove 'YourApplitoolsKey' and replace with your API Key.

Running the Demo

The test file RobotAppEyesTest.txt, is an easily executable test for Robot Framework using Robot-AppEyes Library. For in depth detail on how the keywords function, read the Keyword documentation found here : Keyword Documentation

Remember to include your Applitools API key otherwise the test will not run. To run the test navigate to the Tests directory in C:\Python folder. Open a command prompt within the Tests/acceptance folder and run:

pybot RobotAppEyesTest.txt

Note: It is assumed that anyone who wants to use this demo script is already able to execute robot tests using Google Chrome.

To view a failed comparison between two images, run the test with 1.png in the Compare Image keyword. Next, replace the file name pictureOne.png with pictureTwo.png in the RobotAppEyesTest script and exectue tests again.

Things to Note When Using Applitools

Getting Help

The user group for Robot Framework is the best place to get help. Include in the post: