Importing pytest --junitxml integration report in sonar for java code base

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube developer edition 8.9.9
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
    I have a java based monolith and we have pytest based API integration report generated using pytest --junitxml report, I know sonar has removed support for separate unit & integration report, could you explain how do I integrate both my Junit test report/coverage along with pytest report in sonar, is that even possible?
  • what have you tried so far to achieve this
    AFAIK the pytest junittest report format is completely different from the report format expected by sonar, so I dont know how to proceed and what impact will it have on coverage report since all reports will anyhow be clubbed into one.
    Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!


Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.9 → 9.9.3 → 10.3 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, simply feed in all your test reports. SonarQube will combine the results as needed.


yes we are on it, but despite the upgrade I will still be faced with same concern.

We are planning the upgrade but even after that we will be stuck with this concern.
Is is possible to import that xml report generated via pytest?