pytest-dev / pytest-dev/pytest-html

How to see total tests passed in the summary in pytest-html version 4.1.1 if only failed tests are shown in the summary table

Open
#794 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Discussed in https://github.com/pytest-dev/pytest-html/discussions/793

Originally posted by bhawna0612 January 19, 2024
Hi I upgraded pytest-html version from v3.2.0 to v4.1.1 and I am showing only failed tests in the table.
But in the latest version, it doesn't show the total tests ran, passed count etc. It only shows the failed tests count and duration.

Please see the images for better understanding. I ran the same test suite and different report type is generated.
V3.2.0 is providing more clear picture

V3.2.0

image

V4.1.1
2 tests didn't take 6 mins 25 sec. 13 tests took that much time which is comparable with 386.78 seconds mentioned in v3.2.0

image

How to achieve the same type of report as in v3.2.0?

For reference I am using this hook

image

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 with Discussion #793 and reproduce the report using pytest-html 3.2.0 and 4.1.1, including the hook shown in the issue. Compare the summary behavior when only failed tests are displayed, then verify that the report exposes total, passed, failed, and duration counts as requested.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.