allure-python icon indicating copy to clipboard operation
allure-python copied to clipboard

Path to feature file in allure report

Open rayjlinden opened this issue 4 years ago • 3 comments

I'm submitting a ...

  • [ ] bug report
  • [x] feature request
  • [ ] support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

I have tests in many directories (many repos, in fact). All get run together for a report we gen in Allure. The report shows the feature name. However, there seems to be no way to display the path to the feature file. Because the tests are in lots of dirs - it is then rather painful to find the right file.

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

What is the expected behavior?

Would love for the plugin to also set the path to feature file in the allure report.

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

Ease of use for developers and QA folks.

Please tell us about your environment:

Other information

rayjlinden avatar Jan 12 '21 16:01 rayjlinden

@rayjlinden as a workaround you can add this hook implementation

import allure


def after_scenario(context, scenario):
    uri = "https://github.com/allure-framework/allure-python/tree/master/allure-behave/{filename}".format(filename=scenario.filename)
    allure.attach(uri, name="test location", attachment_type=allure.attachment_type.URI_LIST)

sseliverstov avatar Jun 02 '21 21:06 sseliverstov

@rayjlinden but the best solution is to provide suite labels for behave reports. So please do not close this issue

sseliverstov avatar Jun 02 '21 21:06 sseliverstov

I don't think the workaround works anymore. image

asyncmind0 avatar Oct 26 '21 00:10 asyncmind0