Skip to main content

Visual Verification testing library for Robot Framework

Project description

EyesLibrary for Robot Framework

Introduction

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

This library is a fork of Robot-AppEyes. In order to use EyesLibrary, you are required to sign up for a free account with Applitools. See the Usage section.

Requirements

  • Python 2.7.14
  • Robot Framework 3.1.1
  • Eyes-Selenium 3.15.2
  • SeleniumLibrary 3.3.1 (For Web Tests)
  • AppiumLibrary 1.5.0.2 (For Mobile Tests)

Installation

The recommended installation method is using pip:

pip install robotframework-eyeslibrary

To update both the library and all its dependencies to the latest version:

pip install --upgrade robotframework-eyeslibrary

To install a specific version:

pip install robotframework-eyeslibrary==(DesiredVersion)

Uninstall

To uninstall EyesLibrary use the following pip command:

pip uninstall robotframework-eyeslibrary

Directory Layout

EyesLibrary/

  The Robot Framework Python Library that makes use of the Applitools Eyes Python SDK

tests/acceptance/ :

  Test files to display what the keywords from EyesLibrary accomplish

docs/ :

  Documentation for the EyesLibrary: Keyword Documentation and ChangeLog

Usage

To write tests with Robot Framework and EyesLibrary, EyesLibrary 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 EyesLibrary 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 Framework resource file common.robot, by removing 'YourApplitoolsKey' and replacing with your API Key.

Running the Demo

At tests/acceptance directory, you can find Robot Framework tests for:

  • Web
  • Android Browser
  • Android Native App
  • Android Hybrid App
  • iOS Browser
  • iOS Native App
  • iOS Hybrid App

Before running the tests, your Applitools Api Key must be set in tests/acceptance/resources/common.robot, by replacing "YourApplitoolsApiKey" with your own key.

When running the mobile tests, you must replace the variables within tests/acceptance/resources/mobile.robot with your own, as well as the ones in tests/acceptance/resources/android.robot or tests/acceptance/resources/ios.robot, according to the OS in use.

Before running the Mobile Hybrid App tests, you need to install the Demo App (APK found at tests/resources) in your device.

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 a test, open a command prompt within the tests/acceptance folder and run:

robot FILENAME.robot

For example, to run the Test Suite for Web:

robot web.robot

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

Things to Note When Using Applitools

  • The tests will be accepted automatically by Applitools Eyes after the first run because a new baseline is being created. A second test run will show a successful comparison between screens.
  • Changing the Applitools' Application Name variable value will create a new test entry in Applitools test result screen and a new baseline will be accepted automatically by Applitools Eyes on the first run.
  • The viewport size should not be set to greater values than the maximum size of the device's window. (For more information on using viewports, https://applitools.com/docs/topics/general-concepts/using-viewports-in-eyes.html)

Getting Help

To be defined.

Credits

EyesLibrary was forked from Robot-AppEyes on version 1.2.

Robot-AppEyes authors:

EyesLibrary then emerged as an independent library from the original one, on version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-eyeslibrary-2.0.post1.tar.gz (6.0 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page