missing expected elements (e.g. errors, failures, testcase list, ... ) if no failures in xml output file
Several build tools require that the output files from various code analysis tools be in the junit-xml format. I can see how to output to xml using bandit, but not to junit xml format. Is there support for this?
actually, the problem I'm hitting is not that it's not in junit-xml format, but rather that the file is missing some elements on a successful run. For example, I'm getting:
<?xml version='1.0' encoding='utf-8'?>
<testsuite name="bandit" tests="0" />
whereas I think it needs to look something like:
<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="bandit" skips="0" tests="1" time="2.523">
<testcase classname="bandit" file="bandit" line="1" name="bandit-py3_7-linux" time="2.523">
</testcase>
</testsuite>
How come on a successful run it doesn't include the number of tests, the time, and 0 for failures, errors, ans skips?
actually, for now I'm going to replace the file with this (less than ideal):
<?xml version='1.0' encoding='utf-8'?>
<testsuite name="bandit" errors="0" failures="0" skipped="0" tests="1">
<testcase classname="bandit" name="bandit">
</testcase>
</testsuite>
Hi, any updates on if junit xml format is planned?