Skip to content

Commit 13b6803

Browse files
committed
Update README.md
1 parent 84ed41c commit 13b6803

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ if __name__ == '__main__':
9898
failfast=False, buffer=False, catchbreak=False)
9999
````
100100

101+
### Reporting to a single file
102+
103+
````
104+
if __name__ == '__main__':
105+
with open('/path/to/results.xml', 'wb') as output:
106+
unittest.main(
107+
testRunner=xmlrunner.XMLTestRunner(output=output),
108+
failfast=False, buffer=False, catchbreak=False)
109+
````
110+
111+
### Doctest support
112+
101113
The XMLTestRunner can also be used to report on docstrings style tests.
102114

103115
````python
@@ -135,7 +147,7 @@ TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'
135147

136148
Also, the following settings are provided so you can fine tune the reports:
137149

138-
**TEST_OUTPUT_VERBOSE** (Default: `1`)
150+
**TEST_OUTPUT_VERBOSE** (Default: `1`, choose between `0`,`1`, and `2`)
139151

140152
Besides the XML reports generated by the test runner, a bunch of useful
141153
information is printed to the `sys.stderr` stream, just like the
@@ -155,6 +167,13 @@ Tells the test runner where to put the XML reports. If the directory
155167
couldn't be found, the test runner will try to create it before
156168
generate the XML files.
157169

170+
**TEST_OUTPUT_FILE_NAME** (Default: `None`)
171+
172+
Tells the test runner to output a single XML report with this filename
173+
under `os.path.join(TEST_OUTPUT_DIR, TEST_OUTPUT_FILE_NAME)`. Please note
174+
that for long running tests, this will keep the results in memory for
175+
a longer time than multiple reports, and may use up more resources.
176+
158177

159178
## Contributing
160179

0 commit comments

Comments
 (0)