pytest-dev / pytest-html

Plugin for generating HTML reports for pytest results
Other
698 stars 235 forks source link

add html anchors to each stdout line #213

Open ssbarnea opened 5 years ago

ssbarnea commented 5 years ago

Sometimes the captured stdout/stderr can be quite long and it would be very useful if users could share bookmarks that send user to the exact captured line.

Example: http://logs.openstack.org/73/645273/26/check/tox-molecule/87eb604/tox/reports.html

To enable this we may need to add line numbers to the output but this can be done in pure CSS.

BeyondEvil commented 5 years ago

Hey @ssbarnea!

You mean similar to what you can do with GitHub and create links to specific lines of code?

That would be awesome! ❤️

fenchu commented 2 years ago

Tried adding id to each resultline and use as anchor, but it also needs to expand the extras. I like to be able to just add a #anchor to the end of the html and it will jump there and expand the result.