Skip to content

Add missing junitxml ini options to the reference docs #5338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion doc/en/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,22 @@ passed multiple times. The expected format is ``name=value``. For example::
This tells pytest to ignore deprecation warnings and turn all other warnings
into errors. For more information please refer to :ref:`warnings`.


.. confval:: junit_duration_report

.. versionadded:: 4.1

Configures how durations are recorded into the JUnit XML report:

* ``total`` (the default): duration times reported include setup, call, and teardown times.
* ``call``: duration times reported include only call times, excluding setup and teardown.

.. code-block:: ini

[pytest]
junit_duration_report = call


.. confval:: junit_family

.. versionadded:: 4.2
Expand All @@ -1102,9 +1118,34 @@ passed multiple times. The expected format is ``name=value``. For example::
[pytest]
junit_family = xunit2

.. confval:: junit_suite_name

.. confval:: junit_logging

.. versionadded:: 3.5

Configures if stdout/stderr should be written to the JUnit XML file. Valid values are
``system-out``, ``system-err``, and ``no`` (the default).

.. code-block:: ini

[pytest]
junit_logging = system-out


.. confval:: junit_log_passing_tests

.. versionadded:: 4.6

If ``junit_logging != "no"``, configures if the captured output should be written
to the JUnit XML file for **passing** tests. Default is ``True``.

.. code-block:: ini

[pytest]
junit_log_passing_tests = False


.. confval:: junit_suite_name

To set the name of the root test suite xml item, you can configure the ``junit_suite_name`` option in your config file:

Expand Down