visual-regression-tool v1.0.13
WebdriverIO Cucumber + Syngrisi integration
This project is based on Cucumber Boilerplate for more details see the project Readme.md. Below is information on the Syngrisi integration and features related topic. You can also check more internal details on SDK for Syngrisi repo
QUICK START
⚠️ Before use visual regression steps (
features/step_definitions/visual_sd.js
) be sure Syngrisi server is running.
Clone the hpe project
$ git clone git@github.com:HewlettPackard/hpe-com.git
Go to the test automation project folder and install dependencies, e.g.:
$ cd /hpe-com/hpe-test-automation
$ npm install
Run smoke test to be sure everything goes well
$ npm run smoke
Run specific test
$ npx wdio wdio.conf.js --spec ./features/select.feature
You can also use npm test
as alias for npx wdio wdio.conf.js --spec
it also runs npm i
under the hood:
$ npm test -- ./features/select.feature
Run specific tests with Cucumber tag expressions
$ npx wdio wdio.conf.js --spec ./features --cucumberOpts.tagExpression='@tag1 and @tag2'
For headless browser use HL
environment variable with 1
value e.g.:
$ cross-env HL=1 npx wdio wdio.conf.js --spec ./features/smoke/smoke_simple.feature
See other tests running options in the WebdriverIO Readme.md
Requirements
- Node version 12 or higher
Environment variables
use cross-env command line to set up environment variables across different operation systems.
RUN_NAME
- name of visual tests current run, if not set will generate automatically
HL
- set this to 1
to run chrome in Headless mode (only for chrome and local run)
BASE_URL
- site base url for navigation steps, default is https://www.hpe.com
WW
- Windows Width
WH
- Windows Height
BROWSER
- acceptable values firefox, chrome, ie, edge, safari, SamsungGalaxyTabS4, iPhoneXS, default value is chrome
BROWSER_ENV
- environment for a browser - local
, selenoid
, bs
, default value is local
SYNGRISI_HOST
- name of Syngrisi instance (default is localhost)
SYNGRISI_PORT
- port of Syngrisi instance (default is 3000)
ALLURE_RESULTS
- allure results folder (default is ./allure-results
)
VRT_RETRY
- retry count (default 0) this works for all scenarios without tag @noretry
MAX_INSTANCES
- number of browsers in parallel
SYNGRISI_API_KEY
- API key for Syngrisi
Report
Generate and open Allure report:
$ npx allure generate ./allure-results/ -o ./allure-report/ --clean
$ npx allure serve
or
$ npm run report
To clean reports and results:
$ npm run allureclean