-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf9ddb2
commit 4427257
Showing
1 changed file
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,54 @@ npm install @wdio/visual-reporter --save-dev | |
|
||
## Usage | ||
|
||
To build the report you can call the CLI with `npx @wdio/visual-reporter` and answer all questions | ||
To build the report you can call the CLI or use prompts to answer all questions | ||
|
||
### The CLI | ||
### CLI | ||
|
||
You can call `npx @wdio/visual-reporter` with the following arguments | ||
|
||
#### `--jsonOutput` | ||
|
||
**Mandatory:** true | ||
|
||
The path to the `output.json` file that is generated after each run with the Visual Testing module. | ||
|
||
#### `--reportFolder` | ||
|
||
**Mandatory:** true | ||
|
||
The folder where you want to store the report that is generated by this module | ||
|
||
#### `--logLevel` | ||
|
||
**Mandatory:** false | ||
**Possible values:** `debug` | ||
|
||
This will generate extra logs when errors happen | ||
|
||
#### Example usage | ||
|
||
```sh | ||
npx @wdio/visual-reporter --jsonOutput=/Users/wdio/visual-testing/.tmp/actual/output.json --reportFolder=/Users/wdio/visual-testing/.tmp/ --logLevel=debug | ||
``` | ||
|
||
This will generate the following logs | ||
|
||
```logs | ||
npx @wdio/visual-reporter | ||
--jsonOutput=/Users/wdio/visual-testing/.tmp/actual/output.json --reportFolder=/Users/wdio/visual-testing/.tmp/ --logLevel=debug | ||
✔ Build output copied successfully to "/Users/wdio/visual-testing/.tmp/report". | ||
⠋ Prepare report assets... | ||
> @wdio/[email protected] script:prepare.report | ||
> node ./dist/prepareReportAssets.js | ||
✔ Successfully generated the report assets. | ||
``` | ||
|
||
### Prompts | ||
|
||
Open a terminal, enter `npx @wdio/visual-reporter` and answer all the questions | ||
|
||
https://github.com/user-attachments/assets/fdd8a838-29c0-4235-9bac-fff0269e292e | ||
|
||
|