sergets / hermione-verify-screenshot

Screenshot verification plugin for gemini-testing/hermione
1 stars 2 forks source link

Save screenshot-diff on failed test in allure report #10

Open evsevolodov opened 6 years ago

evsevolodov commented 6 years ago

Hi!

I'm using hermione as test runner and hermione-allure-reporter for generating test reports. Is it possible to attach screenshot from screenshot-diff to appropriate failed test in Allure Report?

Thank you in advance!

sergets commented 6 years ago

Hi @evsevolodov!

Actually, unfortunately, stock hermione-allure-reporter doesn't provide an interface for this. We have an internal allure-reporter plugin in Yandex that exposes allure object with createAttachment method to hermione command's this scope. And I've implemented support for it here in hermione-verify-screenshot.

That plugin has loads of Yandex-specific stuff useless for everyone outside, so I unfortunately don't expect it to be open-sourced soon.

So, I suggest you to fork hermione-allure-reporter, make it expose Allure instance as this.allure to hermione commands, and then hermione-verify-screenshot will automatically do the rest.