pytest-html icon indicating copy to clipboard operation
pytest-html copied to clipboard

future plans: render junit report files with javascript?

Open ssbarnea opened this issue 5 years ago • 4 comments
trafficstars

This is more of a long term direction option for pytest-html: instead of rendering a HTML file with the plugin maybe it would be better to make it load and display junit reports using JavaScript.

Even mobile browsers are very powerful now and such a design would allow hosting the rendering code in a single place and just to generate a very small html which loads the JavaScript renderer and the report file(s).

Does this makes sense? Do you see any problems with a design like this?

One of the advantages is that it would greatly reduce the footprint of the reports and will also allow users to upgrade renderer at any time, even after reports were generated.

ssbarnea avatar Aug 10 '20 09:08 ssbarnea

I remember @davehunt wanting to keep JS to a minimum, but I don't know why or if it's relevant anymore.

I don't know enough about JS to be either for or against. 🤷‍♂️

What are @gnikonorov thoughts on this?

BeyondEvil avatar Aug 10 '20 12:08 BeyondEvil

I’m open to the idea. I do have a few questions though:

  • Could we extend JUnit functionally if needed, or is this not possible
  • Why JUnit over other alternatives

gnikonorov avatar Aug 10 '20 12:08 gnikonorov

I do not have a specific source format in mind, basically I would aim to reuse the best JavaScript report loader I find as I have no plans to write one myself. And clearly that we could think about supporting more than one source format.

ssbarnea avatar Aug 10 '20 12:08 ssbarnea

I like the idea since it would make our output more similar to what people are used to seeing, and it sounds like it wouldn’t be too restricting, if at all.

Could we utilize existing pytest functionality like this for example?

gnikonorov avatar Aug 10 '20 13:08 gnikonorov