[pytest-dev] junitxml incremental output writing
Ronny Pfannschmidt
opensource at ronnypfannschmidt.de
Mon Apr 6 03:24:34 EDT 2020
**re-sent with correct sender mail**
Hi Floris,
an incremental writer has to continuously update either the
pre-overstretched xml header of the report or continuously rewrite the
file at once.
An implementation would be tricky and need someone to dedicate to it to
weed out the detail ussues that will invariably crop up.
Another approach could be to just write the xml report parts of each
item into a junitxml.parts file and
at the end of the test to just recombine the file with the enclosing xml
element.
I think people that care about it should come up with it.
-- Ronny
Am 05.04.20 um 15:12 schrieb Floris Bruynooghe:
> Hello all,
>
> One of the most common things users of pytest-timeout struggle with is
> that they lose Junit XML reporting when a timeout occurs. This never
> bothered me, it was by design, but that doesn't stop users from being
> bothered.
>
> Which made me wonder, does anyone know if there's a reason that the
> Junit XML reporting can't write it's report incrementally as each test
> executed? Not sure that would work well with xdist though.
>
> An additional thing or alternative would be if there's a hook that we
> could use from plugins to say "finish reporting now". So
> e.g. pytest-timeout could report a failure for the test which timed out,
> call this hook and only then terminate the process.
>
>
> I'm only bouncing around ill-thought through ideas around this to see
> what other people think.
>
> Cheers,
> Floris
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
More information about the pytest-dev
mailing list