Skip to content
/ hideo Public

Visual regression testing reporter

License

Notifications You must be signed in to change notification settings

paazmaya/hideo

Repository files navigation

Hideo (秀雄)

Visual regression testing reporter

Mrs Hideo Sonobe

Ubuntu Build Status

This project is

generates an report, one or more web pages, from directories of screen captures and a possible meta data, such as generated by shigehachi

Background for the name

The name of the project is for honouring the legacy of Mrs Sonobe Hideo (園部 秀雄), who was the 15th head master of Jikishinkageryu Naginatajutsu (直心影流薙刀術), which is an ancient Japanese martial art, focusing the handling of a long pole like weapon called naginata.

Getting started

Please note that the minimum supported version of Node.js is 14.15.0, which is the active Long Term Support (LTS) version.

The metrics input is expected to look something similar to, such as provided by shigehachi version 6 onwards:

{
  "5317107e6e45bc44da564197e8478702": {
    "metric": "RootMeanSquaredError",
    "normalized": {
      "red": "0.0410206303",
      "green": "0.2454052653",
      "blue": "0.2478704718",
      "opacity": "0.3134753265",
      "total": "0.2353789431"
    },
    "absolute": {
      "red": "2688.3",
      "green": "16082.6",
      "blue": "16244.2",
      "opacity": "20543.6",
      "total": "15425.6"
    },
    "A": "tests/fixtures/prev/postcss.png",
    "B": "tests/fixtures/curr/postcss.png",
    "diff": "tests/fixtures/output/postcss-rmse-tint.png"
  }
}

The data collected by shigehachi is basically gathering what GraphicsMagick tells when using its compare utility.

The resulting HTML site is build by using JavaScript template strings.

Command line options

The output of hideo --help pretty much covers all the options:

Contributing

"A Beginner's Guide to Open Source: The Best Advice for Making your First Contribution".

Also there is a blog post about "45 Github Issues Dos and Don’ts".

Linting is done with ESLint and can be executed with npm run lint. There should be no errors appearing after any JavaScript file changes.

Unit tests are written with tape and can be executed with npm test. Code coverage is inspected with nyc and can be executed with npm run coverage after running npm test. Please make sure it is over 90% at all times.

Version history

Changes happening across different versions and upcoming changes are tracked in the CHANGELOG.md file.

License

Copyright (c) Juga Paazmaya [email protected]

Licensed under the MIT license.