Skip to content

pixdif/html-reporter

Repository files navigation

Pixdif HTML Reporter

Build Status Npm Package

This is an extension for pixdif to display test results as a web page, and update baseline files in visual test reports. The web page is super tiny (unpacked size < 60KB) and fast because it is built with only a few web components based on lit.

License

MIT

Features

  • Display all test cases in a table with brief test results.
  • Click a test case to view all visual differences.
  • Update baselines with one click (via REST APIs from pixdif).
  • Scroll up and down to view all visual differences in one page.
  • Add custom extra columns to the table.

Installation

npm install @pixdif/html-reporter

Example

import type { TestReport } from '@pixdif/model';
import generateReport from '@pixdif/html-reporter';

const sample: TestReport = {
	// your test results
};
await generateReport(sample, 'output');