allure-framework / allure-python

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

Use 3rd listeners interface version for allure_robotframework listener #754

Open MrBIN89 opened 1 year ago

MrBIN89 commented 1 year ago

I'm submitting a ...

What is the current behavior?

allure-robotframework==2.13.2 uses ROBOT_LISTENER_API_VERSION = 2 version that doesn't allow to modify test on the fly

What is the expected behavior?

Use ROBOT_LISTENER_API_VERSION = 3 to make extending the listener usage more powerfull.

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

In my case I would like to enrich the test message with opened issue link and others additions.

Please tell us about your environment:

allure-python-commons 2.13.2 allure-robotframework 2.13.2

delatrie commented 1 year ago

Hello, @MrBIN89 ! Thank you for the feature request!

Could you please elaborate on what do you mean by extending the listener? How would you have used the listener to achieve your goal if it implemented the version 3 of the API?

MrBIN89 commented 7 months ago

Sorry for the big delay. Well, in my case I need to add Jira ticket link to each failed test on Allure and also in robot framework log.html file to be consistent. So in current implementation (with ROBOT_LISTENER_API_VERSION = 2) I need to:

  1. extend end_test method to add a Jira link to Allure,
  2. create separate listener with pretty the same functionality to add the same links to log.hmtl file.

Although, it could be done in one step in case the allure-robotframework will use ROBOT_LISTENER_API_VERSION = 3 that allows to modify test data on the fly.