Reputation: 121
I am using python 3.6 and pytest-html to generate HTML reports . Everything is successfully working but when i share my html report to my manager the css of the entire document is out of placed .can someone tell the reason to why it is happening and the solution for it .
The view of reports when i run:
The view of the reports when i share the document with my manager
Upvotes: 4
Views: 4408
Reputation: 111
include --self-contained-html when you are calling your pytest...such as pytest your.pyfilename --html=pathandfilename --self-contained-html.
Your result file have inline css in it.
Upvotes: 11
Reputation: 2133
It seems like you are not sharing whole bunch of items like CSS with html file you are giving. Just place the CSS code inside your HTML rather than giving the path and it will solve your problem.
Upvotes: 0