Closed ansonliao closed 4 years ago
Could you please specify what means "looks not good"? What exactly do you expect to improve?
could I remove SelenideLogger#beginStep
's the first parameter source
: $("testing")
,
and the log content can be parsed \n
, for example, the test video and test log can be in new line:
Test video: http://...
Test logs: http://
thanks
@ansonliao In the first comment you mentioned that this is your code:
SelenideLog log = SelenideLogger.beginStep("testing", "\nTest video: " + videoUrl + "\nTest logs: " + logUrl);
So why you cannot just remove "testing"
and "\n"
from your code?
@asolntsev
When I removed "testing"
from SelenideLogger#beginStep
:
When I updated my code for SelenideLogger#beginStep)
to
SelenideLog log = SelenideLogger.beginStep("Test video: ", videoUrl + " Test logs: " + logUrl);
SelenideLogger.commitStep(log, LogEvent.EventStatus.FAIL);
finally got:
@ansonliao Sure, because method beginStep
needs at least 2 arguments.
Actually, it seems to be a misusage of SelenideLogger
. Method beforeStep
should be called before some action, but you are calling it after.
I recommend to look at Allure Selenide sources - it already can add browser logs to Allure report. I believe you can add videos in the same manner.
@asolntsev you still don't get what I mention, anyway, let it go. thanks for your help.
@ansonliao The only way to make me understand you is to explain :)
Hi @asolntsev , my solution is wrong, maybe can override the AllureSelenide#afterEvent
to provide more extra failure information?
https://github.com/allure-framework/allure-java/blob/master/allure-selenide/src/main/java/io/qameta/allure/selenide/AllureSelenide.java#L130
thanks.
@ansonliao I don't know. I have almost zero experience with Allure. :( I recommend to send a question/issue to Allure chat/github.
Sure, thanks @asolntsev
Hi @asolntsev
could you help to solve my problem from the issue of my repo about the Configuration
setting of Selenide
?
I don't want to open an issue in the repo of Selenide
to trouble the regular development issue of Selenide.
Thanks.
https://github.com/ansonliao/Selenium-RottenTomatoes/issues/1
@ansonliao Sure, I will take a look.
Dear @asolntsev , I running Allure with Selenide in Gradle against
Selenoid
browser hub, as you know,Selenoid
provide the video recording function, so I would like to attach the video URL when the test case failed in allure. From the sample: https://github.com/allure-framework/allure-java/blob/b600f7b1d9fbbf81a8efa1f072d0af218530eb46/allure-selenide/src/test/java/io/qameta/allure/selenide/AllureSelenideTest.java#L70-L77and my code is in
@AfterMethod
of TestNG:and finally, I got the report layout is:
it looks not good, could you advise how I can present the video link/log link better? Thanks.