@@ -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+
101113The 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
136148Also, 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
140152Besides the XML reports generated by the test runner, a bunch of useful
141153information 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
155167couldn't be found, the test runner will try to create it before
156168generate 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