On Thu, Jun 04, 2026 at 08:32:05PM +0800, David Gow wrote:
> This is used by things like Jenkins and other CI systems, which can
> pretty-print the test output and potentially provide test-level comparisons
> between runs.
> 
> The implementation here is pretty basic: it only provides the raw results,
> split into tests and test suites, and doesn't provide any overall metadata.
> However, CI systems like Jenkins can ingest it and it is already useful.
> 
> Signed-off-by: David Gow <[email protected]>

Reviewed-by: Thomas Weißschuh <[email protected]>

> ---
> Here's version 3 of the JUnit support patch. This one uses python's 
> ElementTree
> API to generate the XML, rather than writing strings directly. The only real
> difference in the output is that this escapes any log lines, rather than using
> CDATA sections. (There are both advantages and disadvantages to this, but
> they're all pretty minor. Equally, the option of using the
> xml.sax.saxutils.XMLGenerator API instead is a possibility. ElementTree ended
> up being slightly more aligned with the way the JSON version worked.)

I still somewhat prefer an event-based formatting.
(There is also xml.etree.ElementTree.TreeBuilder)
But if the JSON formatter works the same, its fine for me.

(...)

Reply via email to