[pytest-dev] junitxml update
flub at devork.be
Wed Aug 15 16:33:08 EDT 2018
On Tue 14 Aug 2018 at 12:18 -0600, Rusty Howell wrote:
> Hey all,
> I am interested in working on junitxml.
Great! It would really nice if the default support for junitxml would
be up to scratch again.
> Ronny mentioned in one of the bugs the idea of Pytest creating a serialized
> test log, and then have an Junitxml plugin consume the serialized data and
> reformat/output as needed. To me it seems that perhaps this could be
> analogous to logging Loggers and Handlers, where a handler could be
> specific, like "Jenkins Junit Test Report v1.3" vs "Jenkins Junit Test
> Report v1.4", or "Allure 2.6.0", etc.
Firstly a disclaimer I'm not very familiar with junitxml and the current
problems with the plugin. So I may not be giving the best advice.
I'm not sure the logging model is a great thing to clone here. It is a
lot of complexity and won't necessarily help with keeping the code
simpler. In a way this dispatching already exists with the hooks the
plugin needs to implement. E.g. you could think of each "Handler" as a
separate plugin and enable the plugin for a specific version conditionally
on a commandline flag. This way you could for example implement the
various versions as a class each, where the class is the plugin. Then
either have a base class for anything shared, or probably better avoid
inheritance and share anything common by directly instantiating any
common functionality in an object or calling some functions.
Thanks for looking at this!
More information about the pytest-dev