diff --git a/AUTHORS b/AUTHORS index 684063778..00ced49f0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,6 +17,7 @@ Anders Hovmöller Andras Tim Andrea Cimatoribus Andreas Zeidler +Andrey Paramonov Andrzej Ostrowski Andy Freeland Anthon van der Neut diff --git a/changelog/4483.feature.rst b/changelog/4483.feature.rst new file mode 100644 index 000000000..d9bd4c717 --- /dev/null +++ b/changelog/4483.feature.rst @@ -0,0 +1,2 @@ +Add ini parameter ``junit_time`` to optionally report test call +durations less setup and teardown times. diff --git a/doc/en/usage.rst b/doc/en/usage.rst index 49c2aa577..91b91002b 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -294,6 +294,20 @@ To set the name of the root test suite xml item, you can configure the ``junit_s [pytest] junit_suite_name = my_suite +.. versionadded:: 4.0 + +JUnit XML specification seems to indicate that ``"time"`` attribute +should report total test execution times, including setup and teardown +(`1`_, +`2`_). +It is the default pytest behavior. To report just call durations +instead, configure the ``junit_time`` option like this: + +.. code-block:: ini + + [pytest] + junit_time = call + .. _record_property example: record_property