emberjs / ember-qunit

QUnit test helpers for Ember
Other
261 stars 153 forks source link

Capture screenshots on failures #927

Open NullVoxPopuli opened 2 years ago

NullVoxPopuli commented 2 years ago

Just learned about this api: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/captureVisibleTab though, capturing a screenshot of the test area may require something else like: https://github.com/NullVoxPopuli/limber/blob/main/frontend/app/components/limber/copy-menu.gts#L21

Would be great to include a screenshot of the test area in failed assertions, just to provide more information and allow folks to maybe see whan happened before rerunning tests with added pause/debugger/logs/etc

rwjblue commented 2 years ago

Hmm. Not sure what this would actually look like, where would the screenshots go? How would you gain access to them?

mupkoo commented 1 year ago

You can use the artefacts feature of your CI provider to download them and view them. Cypress does this and this is how we get access to those screenshots using GitHub actions

kceb commented 3 months ago

Would this only work in Firefox?

NullVoxPopuli commented 3 months ago

image