Reporting test results
Collect and report test results.
This plugin implements the primary user interface for nose2. It collects test outcomes and reports on them to the console, as well as firing several hooks for other plugins to do their own reporting.
To see this report, nose2 MUST be run with the verbose
flag:
nose2 --verbose
This plugin extends standard unittest console reporting slightly by allowing custom report categories. To put events into a custom reporting category, change the event.outcome to whatever you want. Note, however, that customer categories are not treated as errors or failures for the purposes of determining whether a test run has succeeded.
Don’t disable this plugin, unless you (a) have another one doing the
same job, or (b) really don’t want any test results (and want all test
runs to exit(1)
).
Configuration [test-result]
- always-on
- Default
True
- Type
boolean
- descriptions
- Default
True
- Type
boolean
Sample configuration
The default configuration is equivalent to including the following in a unittest.cfg
file.
[test-result]
always-on = True
descriptions = True
Plugin class reference: ResultReporter
- class nose2.plugins.result.ResultReporter(*args, **kwargs)[source]
Result plugin that implements standard unittest console reporting
- afterTestRun(event)[source]
Handle afterTestRun hook
prints error lists
prints summary
fires summary reporting hooks (
beforeErrorList()
,beforeSummaryReport()
, etc)
- testOutcome(event)[source]
Handle testOutcome hook
records test outcome in reportCategories
prints test outcome label
fires reporting hooks (
reportSuccess()
,reportFailure()
, etc)