@@ -80,22 +80,40 @@ Note that ``from_parent`` should only be called with keyword arguments for the p
80
80
81
81
.. deprecated :: 5.2
82
82
83
- The default value of ``junit_family `` option will change to ``xunit2 `` in pytest 6.0, given
84
- that this is the version supported by default in modern tools that manipulate this type of file.
83
+ The default value of ``junit_family `` option will change to ``xunit2 `` in pytest 6.0, which
84
+ is an update of the old ``xunit1 `` format and is supported by default in modern tools
85
+ that manipulate this type of file (for example, Jenkins, Azure Pipelines, etc.).
85
86
86
- In order to smooth the transition, pytest will issue a warning in case the `` --junitxml `` option
87
- is given in the command line but `` junit_family `` is not explicitly configured in `` pytest.ini ``::
87
+ Users are recommended to try the new `` xunit2 `` format and see if their tooling that consumes the JUnit
88
+ XML file supports it.
88
89
89
- PytestDeprecationWarning: The 'junit_family' default value will change to 'xunit2' in pytest 6.0.
90
- Add 'junit_family=legacy' to your pytest.ini file to silence this warning and make your suite compatible.
90
+ To use the new format, update your ``pytest.ini ``:
91
91
92
- In order to silence this warning, users just need to configure the ``junit_family `` option explicitly:
92
+ .. code-block :: ini
93
+
94
+ [pytest]
95
+ junit_family =xunit2
96
+
97
+ If you discover that your tooling does not support the new format, and want to keep using the
98
+ legacy version, set the option to ``legacy `` instead:
93
99
94
100
.. code-block :: ini
95
101
96
102
[pytest]
97
103
junit_family =legacy
98
104
105
+ By using ``legacy `` you will keep using the legacy/xunit1 format when upgrading to
106
+ pytest 6.0, where the default format will be ``xunit2 ``.
107
+
108
+ In order to let users know about the transition, pytest will issue a warning in case
109
+ the ``--junitxml `` option is given in the command line but ``junit_family `` is not explicitly
110
+ configured in ``pytest.ini ``.
111
+
112
+ Services known to support the ``xunit2 `` format:
113
+
114
+ * `Jenkins <https://www.jenkins.io/ >`__ with the `JUnit <https://plugins.jenkins.io/junit >`__ plugin.
115
+ * `Azure Pipelines <https://azure.microsoft.com/en-us/services/devops/pipelines >`__.
116
+
99
117
100
118
``funcargnames `` alias for ``fixturenames ``
101
119
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments