reportportal / agent-python-pytest

Framework integration with PyTest
Apache License 2.0
95 stars 102 forks source link

support for pytest-html reports #301

Open fenchu opened 2 years ago

fenchu commented 2 years ago

We have highly tuned pytest-html reports showing screenshots walk-through and screenshots on errors. Is there a way to upload the entire directory with report, screenshots and other log files?

Currently we use gitlab-ci to run the tests, and report it to jenkins via its rest-api, there the report looks as it should, but jenkins have other limitations.

Keep up the good work.

HardNorth commented 2 years ago

@fenchu Do you want a tool which will parse your report and fulfill Report Portal accordingly?

fenchu commented 2 years ago

Just viewing the report (reportportal already parses the data correctly via pytest) it is a plain pytest-html report using pytest plugin: https://github.com/pytest-dev/pytest-html (my local fork only have some small changes to the layout, to support more images)

Enclosed is an example of how it looks, it is a *.html file inside a directory with embedded css, javascript, screenshots. it is stored as an attachment to gitlab job (gitlab.zip) where you can see it if you download it, or in jenkins where it shows up directly using the https://plugins.jenkins.io/htmlpublisher/ plugin.

gitlab.zip

it is all just a generic way to enclose a html page with some css and javascript for folding and presentation.