cucumber-ruby icon indicating copy to clipboard operation
cucumber-ruby copied to clipboard

AfterStep: Attach any generation methods (attach/embed), to specific step

Open RayChenLDL opened this issue 2 years ago • 9 comments

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.

RayChenLDL avatar May 27 '22 05:05 RayChenLDL

image

RayChenLDL avatar May 27 '22 05:05 RayChenLDL

cc/ @davidjgoss I know this is something you've been thinking about a little.

luke-hill avatar May 27 '22 08:05 luke-hill

Did a quick little test with cucumber-js:

AfterStep(async function() {
    await this.log('foo!')
});
image

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.

davidjgoss avatar May 28 '22 10:05 davidjgoss

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)

luke-hill avatar May 31 '22 09:05 luke-hill

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)

RayChenLDL avatar May 31 '22 11:05 RayChenLDL

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.

RayChenLDL avatar Jun 01 '22 05:06 RayChenLDL

Any update on this issue please?

RayChenLDL avatar Jun 08 '22 23:06 RayChenLDL

@RayChenLDL can you produce an MVCE ideally in the form of a github repo. If you're using v8 this "should" be working.

luke-hill avatar Jun 09 '22 07:06 luke-hill

give me some time please, I will try again and produce MVCE

RayChenLDL avatar Jul 19 '22 00:07 RayChenLDL

Hi @RayChenLDL are we any further with this. Can we close this as unactionable?

luke-hill avatar Oct 26 '22 09:10 luke-hill

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.

RayChenLDL avatar Oct 26 '22 19:10 RayChenLDL