-
Notifications
You must be signed in to change notification settings - Fork 227
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
Unable to add links to report in Cucumber from code #483
Comments
PR with breaking change is "Fix parallel run and rft lifecycle #253" I've created a simple Cucumber Spring reproducer and detected the order of methods called in AllureLifecycle.java:
Therefore, unit test reproducing the issue is:
Proposed fix is to remove |
PR with proposed fix #531 |
@elantsov try to use the follow tags like in this example |
@y-lazakovich as far as I recall the issue reproduces only if you try to add a link programmatically like this |
I'm submitting a ...
What is the current behavior?
The links are not added to report if trying to add them from hooks or steps code as:
Allure.link("https://example.org")
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Can't provide the demo project but I did a little research.
When Allure tries to add a link it makes:
final Optional<String> root = threadContext.getRoot(); final String uuid = root.get(); final Optional<TestResult> found = storage.getTestResult(uuid);
The problem is that in threadContext there is only Cucumber step or fixture uuid (depending on the place feom which you run Allure.link) and there's no actual root uuid pointing to TestResult uuid. Therefore,
found.isPresent == false
and TestResult is not getting updated with the link.Not sure, but I have a feeling that the root cause of this problem is
threadContext.clear()
that causes real root uuid to be lost.It seems to have been working fine in Allure 2.9.0 and got broken in 2.10.0.
What is the expected behavior?
Allure.link should add links to the report if executed from Cucumber steps code and from Cucumber hooks code.
Please tell us about your environment:
Other information
The text was updated successfully, but these errors were encountered: