Skip to content

Commit 66e11f9

Browse files
committed
doc: explanation and usage of --output-format and --output-directory
1 parent e74b20a commit 66e11f9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/introduction/command-line-runner.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,34 @@ With Chrome specific capabilities you can also run the tests headlessly.
144144
selenium-side-runner -c "chromeOptions.args=[disable-infobars, headless]"
145145
```
146146

147+
### Output tests results to a file
148+
149+
If you need to export test results to a file (when running as part of a CI process for example), you can use a combination `--output-directory` and `--output-format`.
150+
151+
`--output-directory` defines if and where to put the test result files.
152+
153+
`--output-format` defines which format use for the test result file, it can be `jest` or `junit`. The default if format is not specified is `jest`
154+
155+
#### Examples
156+
157+
```sh
158+
selenium-side-runner --output-directory=results
159+
```
160+
161+
Will output results in `jest` frormat in `./results/projectName.json'
162+
163+
```sh
164+
selenium-side-runner --output-directory=results --output-format=jest
165+
```
166+
167+
Will output results in `jest` frormat in `./results/projectName.json'
168+
169+
```sh
170+
selenium-side-runner --output-directory=results --output-format=junit
171+
```
172+
173+
Will output results in `junit` frormat in `./results/projectName.xml'
174+
147175
## A framework at your fingertips
148176

149177
There are also other niceties that come out of the box with the runner. Things you would expect to be available in a traditional test automation framework.

0 commit comments

Comments
 (0)