cucumber-html-reporter icon indicating copy to clipboard operation
cucumber-html-reporter copied to clipboard

being able to attach multiple images

Open lenntt opened this issue 7 years ago • 5 comments

I've a test that does an image comparison and would like to have the reference, actual and diff image all in the html report. but as long as there is a single step.image, I can't have them all in the same view.

Simple way to reproduce:

driver.takeScreenshot().then(function (buffer) {
    return scenario.attach(new Buffer(buffer, 'base64'), 'image/png');
    return scenario.attach(new Buffer(buffer, 'base64'), 'image/png'); // or even better: another buffer
}

Expected result: 2 (similar) images in the report

Current result: 1 image in the report

lenntt avatar Jun 13 '17 13:06 lenntt

@lenntt

There is an open PR for this feature. We will work on it on releasing soon.

Thanks!

gkushang avatar Jun 21 '17 14:06 gkushang

With this we could have a screenshot for each step of the test, wether they pass or fail. This would be useful when debugging failed steps. It's sometimes pretty useful to see screenshots for all the steps following an error.

If possible I'd like to mimic the "Inline screenshots" feature of protractor-beautiful-reporter :

image

AltarBeastiful avatar Sep 11 '17 09:09 AltarBeastiful

@AltarBeastiful, it doesn't seem like you're talking about the same thing, but check out https://github.com/cucumber/cucumber-js/issues/997#issuecomment-377212613 to see how I do it.

rkrisztian avatar Mar 29 '18 12:03 rkrisztian

@gkushang Are we planning to implement it, I have similar requirement where need to attach multiple screenshots to a cucumber steps ?

krarpitgupta avatar Apr 30 '21 04:04 krarpitgupta

@lenntt

There is an open PR for this feature. We will work on it on releasing soon.

Thanks!

@gkushang I know its been several years, but is this feature still possible to merge? Being able to attach multiple images to a single step would be very helpful. Right now it appears that while it loops on the embeddings attribute of each step, step.image is a singular item, so it will only keep the last image, whereas if step.image was an array, it could keep multiple. Same for other attachment types (text, logs, etc.).

david-vankampen avatar May 10 '24 18:05 david-vankampen