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

Controlling test results through query parameters does not take effect!

Open Northxw opened this issue 3 years ago • 4 comments

I'm reading the latest documentation of the pytest-html plugin, when I try ?visible=error to filter the failed results in the test report, but it doesn't work. for example:

http://localhost:63342/plugins/report/report.html?visible=error

So, is my method of use wrong, or there are some hidden problems that prevent it from taking effect, I hope to get an answer, thank you very much.

Northxw avatar Mar 26 '22 09:03 Northxw

I'm not sure, I'll try to reproduce it locally.

What OS and python and plugin versions are you using?

BeyondEvil avatar Mar 27 '22 01:03 BeyondEvil

Windows10-19043.1586 Python 3.6.5 pytest 6.2.5 pytest-metadata 1.11.0 pytest-html 3.1.1

Northxw avatar Mar 27 '22 07:03 Northxw

I'm seeing this behavior too, the page without the visible query parameter, and the page with it is unchanged.

pytest 7.0.1 pytest-metadata 1.11.0 pytest-html 3.1.1

And just so I'm clear, the expected behavior is the visible query parameter controls which checkboxes are checked initially on page load?

I also tried downgrading pytest-html to 3.0.0, 2.1.1, 2.0.1 and none of these had the query parameter do anything.

Rickkwa avatar May 18 '22 19:05 Rickkwa

It seems this might be an unreleased feature. In main.js of the latest tag (3.1.1 at time of writing), there is no reference to "visible" at all. But in the master branch (e09ebfa at the time of writing), it's there.

Edit: I guess this is another instance of #511 in play.

Rickkwa avatar May 18 '22 23:05 Rickkwa