3.5.21 • Published 2 years ago

worthy-applitools v3.5.21

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Applitools - cross browsers visual tests

Description:

This is an npm package for creating visual/UI tests with applitools, selenium and mocha, but only after installing the worthy-selenium-webdriver or having infrastructure for webdriver.

First what is applitools?

Applitools was founded by software developers on a mission to shorten the release cycles of their product Despite having good unit test coverage and automated end-to-end functional tests, to have a full automated regression of the UI, covering multiple operating systems, web browsers, screen resolutions, and localizations.

Applitools provides service to automate all the visual tests including running on several devices and browsers.

Basically it renders the application dom and captures a screenshot while comparing it to the original baseline.

Notify when a difference between the 2 screenshots appear.

Why as NPM package?

The goal is to implement this tool in any service that requiers visual test, create an isolated tests for each service.

Caveat

Aplitools capture a screenshot of the application after it renders the dom application on several devices, which means the tests takes time.

Installation

npm install worthy-applitools
  • In order to create applitools tests you have to have worthy-selenium-webdriver package already installed.

  • for the structure of the tests

    npm install mocha

Usage

  1. SetUp.test.ts -

    Optional - this is a commented class that can help you set the setup test class easily.

    Set up basic configuration for running an applitools test, this class uses methods from the applitools base class.

    Like setting the visual grid runner for running the tests on different browsers and devices, set the eyes object and etc.

    For examples and docs go to -> https://applitools.com/docs/api/eyes-sdk/classes-gen/class_visualgridrunner/method-visualgridrunner-visualgridrunner-selenium-java.html

  1. ApplitoolsBase.ts -

    a. Eyes -

    This method set the eyes object for using the methods of the eyes.

    getAndSetEyes();

    After you set the eyes object you use eyes open to open the connection to applitools inside your

    test

Call this method at the beggining of your test before calling any of the check methods.

await eyesOpen();

b. getRunner - Use this method to create a runner that manages tests of the Ultrafast Grid to render screenshots. Pass this object to each Eyes constructor.

let runner = getRunner();
eyes = new Eyes(runner);

c. getConfiguration - Use this method to configure you confoguration for the test, set the application name, api key(applitools user id) and add several devices and borswers that the test will run on.

d. closeEyes - This method close the eyes object - print errors when there are UI differences.

  1. EyesActions - 

    a. eyesCheck - create a check in your tests Calling this method renders the dom and capture the screenshot.

    Note: this must be called after eyesOpen();

    eyesCheck(whatIsTheCheck: string);
3.5.19

2 years ago

3.5.18

2 years ago

3.5.17

2 years ago

3.5.16

2 years ago

3.5.21

2 years ago

3.5.20

2 years ago

3.5.14

3 years ago

3.5.12

3 years ago

3.5.11

3 years ago

3.5.15

3 years ago

3.5.4

3 years ago

3.5.9

3 years ago

3.5.8

3 years ago

3.5.3

3 years ago

3.5.2

3 years ago

3.5.1

3 years ago

3.5.0

3 years ago

3.4.8

3 years ago

3.4.7

3 years ago

3.4.6

3 years ago

3.4.5

3 years ago

3.4.0

3 years ago

3.4.4

3 years ago

3.4.3

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.3

3 years ago

3.1.2

3 years ago

3.1.0

3 years ago

3.1.4

3 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago