-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add junit_suite_name
ini option
#2274
Add junit_suite_name
ini option
#2274
Conversation
Perhaps it would make more sense as a |
Could please also add one line or two to the docs? I think this should go into Creating JUnitXML format files
----------------------------------------------------
To create result files which can be read by Jenkins_ or other Continuous
integration servers, use this invocation::
pytest --junitxml=path
to create an XML file at ``path``.
.. versionadded:: 3.1
To set the name of the root test suite xml item, you can configure the ``junit_suite_name`` option in your config file:
.. code-block:: ini
[pytest]
junit_suite_name = my_suite |
CHANGELOG.rst
Outdated
@@ -5,6 +5,8 @@ | |||
New Features | |||
------------ | |||
|
|||
* junitxml: Add `--junit-suite-name` option to specify root `<testsuite>` name for JUnit XML reports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a RST file, so you should use double back-ticks to get a monospaced font:
* junitxml: Add ``--junit-suite-name`` option to specify root ``<testsuite>`` name for JUnit XML reports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, please also mention the original issue (#533) here (take a look at the other entries for see the syntax).
Hmm strange, I don't see a |
Pretty much every project i know that generates JUnit-compatible reports uses Thanks for the review. My goal is to get familiar with the pytest project, so every comment and suggestion is really helpful. I agree that this new option belongs to configuration file, not only CLI. I'll update the PR and ping you back. |
Nice to know. 👍
Great, just in case I wasn't very clear, I think we should have only the configuration option, as opposed to both. Since pytest 3.0 we have the
Please let us know if you have any questions or need any pointers. |
@dmand gentle ping. 😁 We plan to release 3.1 somewhat soon, so it would be nice to get this in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, change from CLI argument to ini option
@nicoddemus sorry for the delay. I've updated the PR to use ini option and updated docs/changelog. Let me know if anything needs changes. |
junit_suite_name
ini option
Thanks @dmand for the follow up! Unless somebody wants more time to review this, I will marge it later. |
lovely changes, for nice final history a rebase instead of the merge might be nice, |
Hmm we could have done te rebase directly here in the GUI but we have disabled that option it seems. Rebasing using the UI right before merging seems very useful. Perhaps we should re-enable that option? |
Use a normal function instead of a lambda Parametrize test about suite name option
Rebased and small changes in the tests. This can be merged as soon as CI passes again. 👍 |
@nicoddemus i disabled it because i dont want us to lie about the history submitted, in general i would prefer a merge on our side over a rebase done by us |
Well in the end the result is exactly the same: I did end up rebasing it myself and pushed to @dmand's branch anyway. It was just more work in the end. But I don't really care that much, so if you want to play on the safe side that's fine by me. 👍 |
@nicoddemus thanks for taking care of rebasing. |
It can be used to specify
<testsuite>
'sname
attribute in JUnit XML report. Resolves #533.