How to hide some tags in report #1989
MaximChernyak98
started this conversation in
General Discussion
Replies: 1 comment
-
|
There is no ready-to-use API for this, but you may register a plugin in from allure_commons import hookimpl
from allure_commons import plugin_manager
class AllureTagFilter:
@hookimpl(tryfirst=True)
def report_result(self, result):
result.labels = [
label for label in result.labels
if not (label.name == "tag" and label.value.startswith("@pytest.mark.usefixtures"))
]
def pytest_configure(config):
def cleanup():
name = plugin_manager.get_name(filter_plugin)
plugin_manager.unregister(name=name)
filter_plugin = AllureTagFilter()
plugin_manager.register(filter_plugin)
config.add_cleanup(cleanup)We plan to stop converting such markers to tags in the future. You may track this in allure-framework/allure-python#817. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there!
Our team want to know how to hide some tags in report? For example I want to hide tag "@pytest.mark.usefixtures...", because manual tester don't have to see this information. I've tried to clear report by myself with script (delete tags by regexp) but it din't work stable with multiple threads. Is there any build-in option to filter this marks?
Beta Was this translation helpful? Give feedback.
All reactions