Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Configuring --dashboard --html=report.html in addopts of pytest.ini cannot produce advanced html reports #1378

Answered by mdmintz
HorsonA asked this question in Q&A
Discussion options

Configuring --dashboard --html=report.html in addopts of pytest.ini cannot produce advanced html reports.
I must enter pytest --dashboard --html=report.html on the command line to generate advanced html reports.
My seleniumbase version is 3.3.0.

You must be logged in to vote

Replies: 2 comments 3 replies

Comment options

I would check to see that you aren't using multiple pytest.ini files. I used one, and it worked for me.

[pytest]
# Display console output, disable cacheprovider, and have the ipdb debugger replace pdb:
addopts = --capture=no -p no:cacheprovider --pdbcls=IPython.terminal.debugger:TerminalPdb --dashboard --html=report.html
# Ignore warnings such as DeprecationWarning and PytestUnknownMarkWarning
filterwarnings =
 ignore::pytest.PytestWarning
 ignore:.*U.*mode is deprecated:DeprecationWarning

Here's the output from running a test:

pytest my_first_test.py
========================================== test session starts ===========================================
platform darwin -- Python 3.10.1, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/michael/github/SeleniumBase/examples, configfile: pytest.ini
plugins: html-2.0.1, xdist-2.5.0, forked-1.4.0, metadata-2.0.1, rerunfailures-10.2, ordering-0.6, cov-3.0.0, seleniumbase-3.3.2
collected 1 item 
Dashboard: /Users/michael/github/SeleniumBase/examples/dashboard.html
*********************************************************************
my_first_test.py .
---------- generated html file: file:///Users/michael/github/SeleniumBase/examples/report.html -----------
=========================================== 1 passed in 8.50s ============================================
You must be logged in to vote
2 replies
Comment options

This is my project structure:
2566ea2b9e5482d75eb4437634beae9

Using pytest from the command line:
420b2df06f3d69371f0893af9f5371c
reprot.html shows:
6b50d870fdbd2e6694675a1c651828a

However when I use pytest --dashboard --html=report.html on the command line:
5e642ac7ff42ee216959c8289a6b338
reprot.html shows:
e50a1b03f6db65cbdd38e76abe97abf

Comment options

I created #1379 for the issue. A fix will be ready shortly.

Comment options

You must be logged in to vote
1 reply
Comment options

thanks!

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /