The Visual Reporter is a new feature introduced in the @wdio/visual-service
, starting from version v5.2.0. This reporter allows users to visualize the JSON diff reports generated by the Visual Testing service and transform them into a human-readable format. It helps teams better analyze and manage the visual testing results by providing a graphical interface for reviewing the output.
To utilize this feature, ensure you have the required configuration to generate the necessary output.json
file. This document will guide you through setting up, running, and understanding the Visual Reporter.
Prerequisites
Before using the Visual Reporter, make sure you have configured the Visual Testing service to generate JSON report files:
export const config = {
// ...
services: [
[
"visual",
{
createJsonReportFiles: true, // Generates the output.json file
},
],
],
};
For more detailed setup instructions, refer to the WebdriverIO Visual Testing Documentation or the createJsonReportFiles
Installation
To install the Visual Reporter, add it as a development dependency to your project using npm:
npm install @wdio/visual-reporter --save-dev
This will ensure the necessary files are available to generate reports from your visual tests.