/visual-testing-demo

This is a visual testing automation project using webdriver io and it's visual service package.

Primary LanguageJavaScript

Visual Testing Demo

Table of Contents

About

This is a visual testing automation project using webdriver io and it's visual service package.

Getting Started

Prerequisites

You’ll need Node.js installed.

  • Install at least v16.x or higher as this is the oldest active LTS version
  • Only releases that are or will become an LTS release are officially supported

If Node is not currently installed on your system, we suggest utilizing a tool such as NVM or Volta to assist in managing multiple active Node.js versions. NVM is a popular choice, while Volta is also a good alternative.

node -v # version should be 16 or higher

Install and Run

# clone the repo
git clone https://github.com/Saabbir/visual-testing-demo.git

# cd into visual-testing-demo
cd visual-testing-demo

# install all packages required
npm i

# run single test
npx wdio run ./wdio.conf.js --spec visual-test.js

# run all tests
npm run dev

Notes

  • headless feature doesn't work with browser.setViewport properly
  • checkScreen method works well while checkFullPageScreen doesn't
  • sometimes color differences are shown event if the images are identical