pytest-dev / pytest-dev/pytest-html

Improve handling of multiple images

Open
#35 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
779
Forks
260
PR merge metrics
No merged PRs in 30d

Description

I'm using pytest-html with pytest-selenium. My selenium tests are doing an image diff.

I want to include the results of a failed image diff test in my pytest-html report.

However, if I just use pytest_html.extras.append(...) then my output gets mixed up with pytest-selenium's output and makes for a very incoherent report e.g.

screen shot 2016-03-01 at 3 51 00 pm

Full report at: https://s3.amazonaws.com/bokeh-travis/112986254/tests/pytest-report.html

I have hacked around this at the moment by overriding longrepr and extras completely so that I get something like this:

screen shot 2016-03-01 at 3 42 47 pm

Full report at: https://s3.amazonaws.com/bokeh-travis/112997379/tests/pytest-report.html

What I'd like is a hook to be able to add another row of my own custom test output.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how pytest_html.extras and longrepr/extras are combined with pytest-selenium output. Define the custom-output hook at that integration point, then verify that image-diff results appear in a separate row without mixing the existing report output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.