Отчёт отображается, появились шаги, но скриншот почему то отсутствует.
Я добавил, что бы явно делался скриншот:
override fun afterTest(description: Description, result: TestResult) {
if(result.status == Failure) {
saveScreenshot()
}
}
@Attachment(type = "image/png")
fun saveScreenshot(): ByteArray {
Screenshots.takeScreenShotAsFile()
return Screenshots.getLastScreenshot().readBytes()
}
в папке allure-results вместе с файлами 0afd689c-f8bc-444b-ac84-c4379c989f4b-result.json также атачменты b7d40d19-4b08-47d2-b5c7-e4885685e3bd-attachment , но после генерации отчётов - они не отображаются в репорте.
Вот содержимое отчёта:
{"name":"test2","status":"failed","statusDetails":{"known":false,"muted":false,"flaky":false,"message":"Element should be visible {By.xpath: //div[contains(text(), \"УДОСТОВЕРЕНИЕ\")]}\nElement: '<div class=\"document-type mr-3 active\" displayed:false></div>'","trace":"Element should be visible {By.xpath: //div[contains(text(), \"УДОСТОВЕРЕНИЕ\")]}\nElement: '<div class=\"document-type mr-3 active\" displayed:false></div>'\nTimeout: 4 s.\n\tat com.codeborne.selenide.impl.WebElementSource.checkCondition(WebElementSource.java:72)\n\tat com.codeborne.selenide.commands.Should.should(Should.java:35)\n\tat com.codeborne.selenide.commands.Should.execute(Should.java:29)\n\tat com.codeborne.selenide.commands.Should.execute(Should.java:12)\n\tat com.codeborne.selenide.commands.Commands.execute(Commands.java:144)\n\tat com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:99)\n\tat com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:65)\n\tat com.sun.proxy.$Proxy59.shouldBe(Unknown Source)\n\tat kz.btsd.did.steps.RegistrationSteps.shouldBeOnThirdStep_aroundBody8(RegistrationSteps.kt:68)\n\tat kz.btsd.did.steps.RegistrationSteps$AjcClosure9.run(RegistrationSteps.kt:1)\n\tat org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)\n\tat io.qameta.allure.aspects.StepsAspects.step(StepsAspects.java:50)\n\tat kz.btsd.did.steps.RegistrationSteps.shouldBeOnThirdStep(RegistrationSteps.kt:68)\n\tat kz.btsd.did.specs.RegistrationSpec$1$2.invoke(RegistrationSpec.kt:23)\n\tat kz.btsd.did.specs.RegistrationSpec$1$2.invoke(RegistrationSpec.kt:9)\n\tat io.kotlintest.runner.jvm.TestCaseExecutor$executeTestSet$$inlined$map$lambda$1.call(TestCaseExecutor.kt:104)\n\tat io.kotlintest.runner.jvm.TestCaseExecutor$executeTestSet$$inlined$map$lambda$1.call(TestCaseExecutor.kt:23)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\n"},"stage":"finished","description":"","steps":[{"name":"Подтверждение номера телефона","status":"passed","stage":"finished","steps":[],"attachments":[],"parameters":[{"name":"phoneNumber","value":"7201641700"}],"start":1563877016645,"stop":1563877017497},{"name":"Должен быть на третьем шаге регистрации","status":"failed","statusDetails":{"known":false,"muted":false,"flaky":false,"message":"Element should be visible {By.xpath: //div[contains(text(), \"УДОСТОВЕРЕНИЕ\")]}\nElement: '<div class=\"document-type mr-3 active\" displayed:false></div>'","trace":"Element should be visible {By.xpath: //div[contains(text(), \"УДОСТОВЕРЕНИЕ\")]}\nElement: '<div class=\"document-type mr-3 active\" displayed:false></div>'\nTimeout: 4 s.\n\tat com.codeborne.selenide.impl.WebElementSource.checkCondition(WebElementSource.java:72)\n\tat com.codeborne.selenide.commands.Should.should(Should.java:35)\n\tat com.codeborne.selenide.commands.Should.execute(Should.java:29)\n\tat com.codeborne.selenide.commands.Should.execute(Should.java:12)\n\tat com.codeborne.selenide.commands.Commands.execute(Commands.java:144)\n\tat com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:99)\n\tat com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:65)\n\tat com.sun.proxy.$Proxy59.shouldBe(Unknown Source)\n\tat kz.btsd.did.steps.RegistrationSteps.shouldBeOnThirdStep_aroundBody8(RegistrationSteps.kt:68)\n\tat kz.btsd.did.steps.RegistrationSteps$AjcClosure9.run(RegistrationSteps.kt:1)\n\tat org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)\n\tat io.qameta.allure.aspects.StepsAspects.step(StepsAspects.java:50)\n\tat kz.btsd.did.steps.RegistrationSteps.shouldBeOnThirdStep(RegistrationSteps.kt:68)\n\tat kz.btsd.did.specs.RegistrationSpec$1$2.invoke(RegistrationSpec.kt:23)\n\tat kz.btsd.did.specs.RegistrationSpec$1$2.invoke(RegistrationSpec.kt:9)\n\tat io.kotlintest.runner.jvm.TestCaseExecutor$executeTestSet$$inlined$map$lambda$1.call(TestCaseExecutor.kt:104)\n\tat io.kotlintest.runner.jvm.TestCaseExecutor$executeTestSet$$inlined$map$lambda$1.call(TestCaseExecutor.kt:23)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\n"},"stage":"finished","steps":[],"attachments":[],"parameters":[],"start":1563877017497,"stop":1563877021573}],"attachments":[],"parameters":[],"start":1563877016644,"stop":1563877022306,"uuid":"0afd689c-f8bc-444b-ac84-c4379c989f4b","historyId":"85f46c0c13deba1911ce55e0e9ebd254","labels":[{"name":"host","value":"npa"},{"name":"thread","value":"30600@npa.kotlintest-test-executor-0(41)"}],"links":[]}
Что я не так делаю?