how to use @step annotation for lambda expression in allure-junit-adaptor

811 views Asked by At

use: ru.yandex.qatools.allure:allure-junit-adaptor 1.5.0

want use @Step annotation for field with lambda expression:

@Step("Assert screens")
 protected AssertScreenshotsInterface compareScreenshots = () -> assertThat(compareImages(getEtalonScreenshotPath(), getCurrentScreenshotPath(),
    getDifferentScreenshotPath())).isTrue();

ide show hint: "@Step not applicable to field". I use it function in every test, how to support lambda in allure report?

1

There are 1 answers

0
Serhii Korol On

It's not possible at moment, as Steps's target is METHOD. But you can create a feature request in allure-java project, if it's really important for you.