Skip to content
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

Attachements adding not working in Allure-Jbehave. #157

Closed
2 tasks
aKumpan opened this issue Nov 2, 2017 · 1 comment
Closed
2 tasks

Attachements adding not working in Allure-Jbehave. #157

aKumpan opened this issue Nov 2, 2017 · 1 comment

Comments

@aKumpan
Copy link

aKumpan commented Nov 2, 2017

I'm submitting a ...

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

What is the current behavior?

Allure.addAttachment("My attachment", "My attachment content"); call not working when called from steps. Attachment can be created, but it is not attached to resulting JSON file and to report accordingly.

getLifecycle().updateStep(attachment -> attachment.withAttachments(new Attachment().withName("test"))); - Not working also.

getLifecycle().updateTestCase(uuid, attachment -> testResult..withAttachments(new Attachment().withName("test"))); - is only working one, when called with valid uuid of the test.
(can be tested inside before/afterScenario in io.qameta.allure.jbehave.AllureJbehave).
But this uuid is not accessible anywhere in the steps.

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

Described in https://github.com/aKumpan/allure-java/tree/allure-jbehave-attachements-issue
Commit link: aKumpan@7f0be77

What is the expected behavior?

Expected possibility to add attachments for running scenario/step when using Jbehave.
For now, it is only possible to do inside io.qameta.allure.jbehave.AllureJbehave methods.
(E.g. calling getLifecycle().updateTestCase(uuid, attachment -> attachment.withAttachments(new Attachment().withName("test")));
inside before/afterScenario with current test uuid). Which is not accessible for client side.

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

Adding attachments for test results.

Please tell us about your environment:

Latest master branch for allure-java (allure-jbehave)

Other information

It may be caused because of getLifecycle().getCurrentTestCase(); is always Optional.Empty when called from steps.

@baev
Copy link
Member

baev commented Oct 31, 2018

should be fixed by now

@baev baev closed this as completed Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants