Skip to content

adds filename of report as title to html body #153

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

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

j19sch
Copy link
Contributor

@j19sch j19sch commented Mar 25, 2018

We have a CI dashboard with links to the reports generated for different tests. I'd like to see the filename of the report as title in the body, so it's clear which test results I'm looking at.

Note: I made the assumption that os.path.basename will work across platforms.

Copy link
Collaborator

@davehunt davehunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you! I wonder if it might make sense to allow a --title command line option for users that want to be a little more descriptive.

@davehunt davehunt merged commit abf8f15 into pytest-dev:master Mar 26, 2018
@j19sch
Copy link
Contributor Author

j19sch commented Mar 26, 2018

@davehunt You're welcome. :-)

About the --title command-line option: what about --report-title or --html-title to prevent collision with other plugins their command-line options? Not sure if there's some sort of convention for pytest plugins in this regard?

@davehunt
Copy link
Collaborator

davehunt commented Apr 5, 2018

Of those options I'd probably go for --html-title, but thinking about it, perhaps we should hold back until someone asks for this feature.

@Vic152
Copy link

Vic152 commented Apr 11, 2019

I am asking for this feature :)
--html="output/%BUILD%_Test_Report.html" would generate title: %BUILD%_Test_Report.html.
Filename is fine but the report is not.

Or maybe if %BUILD% could be resolved as title?

@BeyondEvil
Copy link
Contributor

BeyondEvil commented Apr 11, 2019

Hi @Vic152

Would you mind opening a separate ticket for this? Preferably with a clear use-case.
You can reference this ticket for clarity.

Thanks!

@ssbarnea ssbarnea added the enhancement This issue/PR relates to a feature request. label Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants