Skip to content

Commit

Permalink
fix: updated README.md for configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Nederhoff committed Dec 9, 2018
1 parent f24f206 commit 90789dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
lib
node_modules
report.html
!test/data/*.html
.idea
*.tgz
Expand Down
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,17 @@ PICUS' HTML reporter generator for TestCafe automated tests. It provides an HTML
$ npm install testcafe-reporter-html
```

### 2. Configure
### 2. Add the reporter flag to your test task runner

If no configuration is specified, the generated file will be called `report.html` and found in the project's root path.
A configuration file `tcr-html.config.js` can be used to specify any value:

```js
// tcr-html.config.js
module.exports = {
fileName: "test.html",
outputPath: "public",
};
```sh
$ testcafe chrome test_folder/ --reporter html
```

### 3. Add the reporter flag to your test task runner
### 3. Configure the output file

By default the html is written to `stdout`. To write the html to a file use the TestCafe build-in method:
```sh
$ testcafe chrome test_folder/ --reporter html
$ testcafe chrome test_folder/ --reporter html:path/to/my/file.html
```

## Contributing
Expand Down

0 comments on commit 90789dc

Please sign in to comment.