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

Behave html report name #23

Open
aamer436 opened this issue Aug 18, 2021 · 5 comments
Open

Behave html report name #23

aamer436 opened this issue Aug 18, 2021 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@aamer436
Copy link

can we customise the report name which appears on the report. Currently it is displayed as 'Behave Test Report'

@bittner
Copy link
Member

bittner commented Aug 18, 2021

You can set the title attribute of the HTMLFormatter class in Python code. Not by any settings in a configuration file, I'm afraid.

What would be your preferred way of setting a custom document title?

@aamer436
Copy link
Author

I am new to Behave , not sure how to write syntax for the approach you mentioned above.

Please help.

@bittner
Copy link
Member

bittner commented Sep 12, 2021

You'd have to write your own formatter, inheriting from HTMLFormatter, overriding the title attribute in the constructor of your formatter class.

Alternatively, find out an elegant way how to make the title attribute customizable in this formatter, and open a PR to enhance our public implementation.

Either way, you have to do some (substantial) programming, I'm afraid. – I hope that helps.

@bittner bittner added the question Further information is requested label Sep 12, 2021
@jenisys
Copy link
Member

jenisys commented Dec 12, 2021

The behave-html-formatter could support a number of parameters as Userdata parameters, like:

# -- FILE: behave.ini
# CONVENTION: Use "behave.formatter.<FORMATTER_NAME>." as scope prefix for userdata parameters
[behave.user_data]
behave.formatter.html.report_name = "My report name"
behave.formatter.html.xxx = 123

These formatter specific Userdata parameters can be supplied/overwritten by a user (on the command-line or in the config-file, like:

$ behave -f html -D behave.formatter.html.report_name="My Report Name" features/

SEE ALSO:

@jenisys jenisys added the enhancement New feature or request label Dec 12, 2021
@modehnal
Copy link
Collaborator

modehnal commented Feb 1, 2023

I would like to offer you an alternative html formatter under behave-contrib which is behave-html-pretty-formatter that supports this feature.

I believe that it is not out of place to say that this project will no longer be receiving updates from our team (@modehnal @fpokryvk @schidlo ) since we have opted to do a complete re-implementation from scratch in form of a new formatter mentioned above. New formatter is much easier to maintain and improve with new features.

We have opted to not do the changes in this project to provide a choice for those who prefer this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Development

No branches or pull requests

4 participants