{"action":"created","issue":{"url":"https://api.github.com/repos/allure-framework/allure-java/issues/157","repository_url":"https://api.github.com/repos/allure-framework/allure-java","labels_url":"https://api.github.com/repos/allure-framework/allure-java/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/allure-framework/allure-java/issues/157/comments","events_url":"https://api.github.com/repos/allure-framework/allure-java/issues/157/events","html_url":"https://github.com/allure-framework/allure-java/issues/157","id":270546107,"node_id":"MDU6SXNzdWUyNzA1NDYxMDc=","number":157,"title":"Attachements adding not working in Allure-Jbehave.","user":{"login":"aKumpan","id":11076815,"node_id":"MDQ6VXNlcjExMDc2ODE1","avatar_url":"https://avatars3.githubusercontent.com/u/11076815?v=4","gravatar_id":"","url":"https://api.github.com/users/aKumpan","html_url":"https://github.com/aKumpan","followers_url":"https://api.github.com/users/aKumpan/followers","following_url":"https://api.github.com/users/aKumpan/following{/other_user}","gists_url":"https://api.github.com/users/aKumpan/gists{/gist_id}","starred_url":"https://api.github.com/users/aKumpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aKumpan/subscriptions","organizations_url":"https://api.github.com/users/aKumpan/orgs","repos_url":"https://api.github.com/users/aKumpan/repos","events_url":"https://api.github.com/users/aKumpan/events{/privacy}","received_events_url":"https://api.github.com/users/aKumpan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-02T06:34:14Z","updated_at":"2018-10-31T16:40:17Z","closed_at":"2018-10-31T16:40:17Z","author_association":"NONE","body":"[//]: # (\r\n. Note: for support questions, please use Stackoverflow or Gitter**. \r\n. This repository's issues are reserved for feature requests and bug reports.\r\n.\r\n. In case of any problems with Allure Jenkins plugin** please use the following repository \r\n. to create an issue: https://github.com/jenkinsci/allure-plugin/issues\r\n.\r\n. Make sure you have a clear name for your issue. The name should start with a capital \r\n. letter and no dot is required in the end of the sentence. An example of good issue names:\r\n.\r\n. - The report is broken in IE11\r\n. - Add an ability to disable default plugins\r\n. - Support emoji in test descriptions\r\n)\r\n\r\n#### I'm submitting a ... \r\n  - [+] bug report\r\n  - [ ] feature request\r\n  - [ ] support request => Please do not submit support request here, see note at the top of this template.\r\n\r\n#### What is the current behavior?\r\n\r\nAllure.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.\r\n\r\ngetLifecycle().updateStep(attachment -> attachment.withAttachments(new Attachment().withName(\"test\"))); - Not working also.\r\n\r\ngetLifecycle().updateTestCase(uuid, attachment -> testResult..withAttachments(new Attachment().withName(\"test\"))); - is only working one, when called with valid uuid of the test. \r\n(can be tested inside before/afterScenario in io.qameta.allure.jbehave.AllureJbehave).\r\nBut this uuid is not accessible anywhere in the steps.\r\n\r\n\r\n#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem\r\n\r\nDescribed in https://github.com/aKumpan/allure-java/tree/allure-jbehave-attachements-issue\r\nCommit link: https://github.com/aKumpan/allure-java/commit/7f0be7714b0698ae8cfe044ad155e15fbf2d11a7\r\n\r\n#### What is the expected behavior?\r\nExpected possibility to add attachments for running scenario/step when using Jbehave.\r\nFor now, it is only possible to do inside io.qameta.allure.jbehave.AllureJbehave methods. \r\n(E.g. calling         getLifecycle().updateTestCase(uuid, attachment -> attachment.withAttachments(new Attachment().withName(\"test\")));\r\ninside before/afterScenario with current test uuid). Which is not accessible for client side.\r\n\r\n#### What is the motivation / use case for changing the behavior?\r\nAdding attachments for test results.\r\n\r\n#### Please tell us about your environment:\r\nLatest master branch for allure-java (allure-jbehave)\r\n\r\n#### Other information \r\n\r\n[//]: # (\r\n. e.g. detailed explanation, stacktraces, related issues, suggestions \r\n. how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc\r\n)\r\n\r\nIt may be caused because of getLifecycle().getCurrentTestCase(); is always Optional.Empty when called from steps.\r\n"},"comment":{"url":"https://api.github.com/repos/allure-framework/allure-java/issues/comments/434759588","html_url":"https://github.com/allure-framework/allure-java/issues/157#issuecomment-434759588","issue_url":"https://api.github.com/repos/allure-framework/allure-java/issues/157","id":434759588,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDc1OTU4OA==","user":{"login":"baev","id":2149631,"node_id":"MDQ6VXNlcjIxNDk2MzE=","avatar_url":"https://avatars3.githubusercontent.com/u/2149631?v=4","gravatar_id":"","url":"https://api.github.com/users/baev","html_url":"https://github.com/baev","followers_url":"https://api.github.com/users/baev/followers","following_url":"https://api.github.com/users/baev/following{/other_user}","gists_url":"https://api.github.com/users/baev/gists{/gist_id}","starred_url":"https://api.github.com/users/baev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baev/subscriptions","organizations_url":"https://api.github.com/users/baev/orgs","repos_url":"https://api.github.com/users/baev/repos","events_url":"https://api.github.com/users/baev/events{/privacy}","received_events_url":"https://api.github.com/users/baev/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T16:40:17Z","updated_at":"2018-10-31T16:40:17Z","author_association":"MEMBER","body":"should be fixed by now"}}
{"actor":{"display_login":"baev"}}