Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest --html=test.html does not display all test results in test.html #3462

Closed
LiPingYen opened this issue Jan 30, 2025 · 2 comments
Closed
Labels
can't reproduce We tried to see what you saw, but didn't external Outside SeleniumBase's scope. / Ask somewhere else.

Comments

@LiPingYen
Copy link

LiPingYen commented Jan 30, 2025

When I execute a BaseCase formatted test script using pytest with the --html=test.html flag to generate a test report, the report does not display the results of each individual test run.

I have confirmed my environment setup as follows:

  • SeleniumBase version: 3.34.4
  • Python version: 3.12.8
  • pytest-html version: 4.0.2

In Issue #3318, it was mentioned that pytest-html 4.1.1 could not display real-time test results, leading to SeleniumBase pinning pytest-html to version 4.0.2.

I would like to know if there is a better way to resolve this issue or if there is another recommended test reporting tool that can produce reports with all test results as before. Any recommendations would be appreciated.

Image

@mdmintz mdmintz added external Outside SeleniumBase's scope. / Ask somewhere else. can't reproduce We tried to see what you saw, but didn't labels Jan 30, 2025
@mdmintz
Copy link
Member

mdmintz commented Jan 30, 2025

Make sure you have SeleniumBase 4.34.4 or newer. (You said you had 3.34.4... looks like a typo or an old version.)

The Report is rendering for me: I ran this script from the SeleniumBase examples folder:
pytest --chs -n8 --dashboard --html=report.html -v --rs

report.html

Image

The Dashboard is also rendering for me:

dashboard.html

Image

If the html report isn't working for you, there's the SeleniumBase dashboard.

You could also try seeing if your issue appears on the latest version of pytest-html (by force-installing the newer version with the realtime-reporting bug). If there's still an issue there, then it would be an issue with pytest-html, (not SeleniumBase), as the HTML reports are generated from the pytest-html dependency.

@mdmintz mdmintz closed this as completed Jan 30, 2025
@LiPingYen
Copy link
Author

Hi @mdmintz,

Thanks for your response! I wanted to clarify that I made a mistake in my initial report—I'm actually using SeleniumBase 4.34.4.

After further testing, I found that the issue persists regardless of whether pytest-html is version 4.0.2 or 4.1.1. The test results still do not appear in the generated report. I also ran the multi_uc.py script from the SeleniumBase examples, and the behavior was the same.

Additionally, I checked the pytest-html repository for similar issues and found Issue #858, which describes the same problem. This suggests that, as you mentioned, the issue might be a bug in pytest-html that needs to be addressed.

Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce We tried to see what you saw, but didn't external Outside SeleniumBase's scope. / Ask somewhere else.
Projects
None yet
Development

No branches or pull requests

2 participants