allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
713 stars 233 forks source link

Add dynamic.label and dynamic.title support to allure-behave #776

Open delatrie opened 7 months ago

delatrie commented 7 months ago

I'm submitting a ...

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Currently, there is no way to set a test's name or add a label dynamically. The following code has no effect:

@given("...")
def step_impl():
    allure.dynamic.title("New name")
    allure.dynamic.label("tag", "my-tag")

What is the expected behavior?

The code above should change the test's name to "New name" and add the my-tag tag to the test.

What is the motivation / use case for changing the behavior?

To make the runtime API complete.

Please tell us about your environment:

depindersharma commented 5 months ago

considering the methods are available but nothing happens when we call them. It's really an annoying issue. I vote for this issue to be picked up asap. :) Thanks

Fixing this would allow a user to define a tag, package etc. Currently I can't set the package, which on allure report is one of the main Hierarchy view.

ashlndr commented 5 days ago

Just want to update that the issue is still relevant. The runtime API does not work for labels, issues, tags, etc. It only works when applied via decorators.