cucumber-ruby
cucumber-ruby copied to clipboard
AfterStep: Attach any generation methods (attach/embed), to specific step
within my hook.rb, I capture screenshot under "AfterStep" which means I want to capture screen for each of the steps. When I check the html report after the run, all the attached screenshots just piles up at the end. Not very clear for the report audience to tell which screenshot is for which step. Is that possible to attach the screenshot right after each step (as shown in the attached picture.)?
🤔 What's the problem you're trying to solve?
✨ What's your proposed solution?
⛏ Have you considered any alternatives or workarounds?
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
cc/ @davidjgoss I know this is something you've been thinking about a little.
Did a quick little test with cucumber-js:
AfterStep(async function() {
await this.log('foo!')
});

So I think the formatter is behaving correctly. Could this be an issue with how cucumber-ruby is emitting the messages? i.e. it could be missing the testStepId
that ties it to the step.
Also we're slightly behind the 8-ball. We only just did an update (Like 1/2 days ago). This user may be using the messages that are old.
@RayChenLDL please attach your version of cucumber-ruby from your gemfile.lock (Paste all info underneath cucumber-ruby)
Here it is cucumber (8.0.0) builder (~> 3.2, >= 3.2.4) cucumber-ci-environment (~> 9.0, >= 9.0.4) cucumber-core (~> 11.0, >= 11.0.0) cucumber-cucumber-expressions (~> 15.1, >= 15.1.1) cucumber-gherkin (~> 23.0, >= 23.0.1) cucumber-html-formatter (~> 19.1, >= 19.1.0) cucumber-messages (~> 18.0, >= 18.0.0) diff-lcs (~> 1.5, >= 1.5.0) mime-types (~> 3.4, >= 3.4.1) multi_test (~> 1.1, >= 1.1.0) sys-uname (~> 1.2, >= 1.2.2)
That is true the new version 8.0.0 was only published less than 2 weeks ago, which I am interested in give it a try when I am building up the test automation solution for frontend.
Any update on this issue please?
@RayChenLDL can you produce an MVCE ideally in the form of a github repo. If you're using v8 this "should" be working.
give me some time please, I will try again and produce MVCE
Hi @RayChenLDL are we any further with this. Can we close this as unactionable?
Yes,please.
Sent from my iPhone
On 26 Oct 2022, at 7:02 pm, Luke Hill @.***> wrote:
Hi @RayChenLDL are we any further with this. Can we close this as unactionable?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.