Giter Site home page Giter Site logo

asiminaath / eyeslibrary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joel-oliveira/eyeslibrary

0.0 1.0 0.0 8.98 MB

Robot Framework Visual Verification Test Library using Applitools Eyes

License: Apache License 2.0

Python 62.89% RobotFramework 37.11%

eyeslibrary's Introduction

EyesLibrary for Robot Framework

Table of Contents

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

The following versions were used to test the library:

  • Python 2.7.14 or 3.6.0
  • Robot Framework 3.1.1
  • Eyes-Selenium 3.16.2
  • SeleniumLibrary 3.3.1 (For Web Tests)
  • AppiumLibrary 1.5.0.3 (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

You must create a free account with Applitools in order to run EyesLibrary and return results.

Then, to use the library, follow EyesLibrary Keyword Documentation.

This is a Robot Framework library. If you're not familiarized with Robot Framework, please consult Robot Framework User Guide.

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.

For instance, you may want to use a different Remote URL than the one provided in the variables. So, if you are working with TestingBot, for example, you'd have to replace the Remote URL variable in tests/acceptance/resources/mobile.robot:

${REMOTE URL}          http://${CREDENTIALS}@hub.testingbot.com/wd/hub

Before running the Android 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 is already able to execute robot tests using SeleniumLibrary (for web tests) and/or AppiumLibrary (for mobile tests). The browser used to navigate with SeleniumLibrary is 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 comparison between screens.
  • Changing the Applitools baseline parameters will create a new baseline, that is automatically accepted on the first run. (For more information, read the article: What is a ‘baseline’ and how is a baseline created?
  • 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, consult Using viewports in Eyes)

Getting Help

To be defined. It might be helpful to read Applitools Documentation.

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.

eyeslibrary's People

Contributors

nunessf avatar adamsimmons avatar puhnastik avatar patrickwalker avatar garethnixon avatar tbarmstrong avatar mlaflamme avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.