allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

add step in allure report for spock framework

Open alexey-shnaydmiller opened this issue 5 years ago • 6 comments

Context

Checklist

alexey-shnaydmiller avatar Mar 04 '20 10:03 alexey-shnaydmiller

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: alexey-shnaydmiller
:x: Шнайдмиллер Алексей Давыдович


Шнайдмиллер Алексей Давыдович seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Mar 04 '20 10:03 CLAassistant

as far as I get from test you provided -- framework blocks are always displayed before all the steps (from allure)?

baev avatar Sep 17 '20 11:09 baev

The test shows that the allure report prints all the blocks from the spock. Depending on which block of the spock is used, it is printed in the report.

alexey-shnaydmiller avatar Sep 17 '20 13:09 alexey-shnaydmiller

I mean if you have test like this:

given: "given"
step "given step"
when: "when"
step "when step"
then: "then"
step "then step"

you'll see the following scenario in the report:

"given"
"when"
"then"
"given step"
"when step"
"then step"

instead of correct nesting

"given"
    "given step"
"when"
    "when step"
"then"
    "then step"

or flat

"given"
"given step"
"when"
"when step"
"then"
"then step"

baev avatar Sep 17 '20 13:09 baev

I get it. It was just done not to write a Step. I'll fix that shortcoming tomorrow.

alexey-shnaydmiller avatar Sep 17 '20 13:09 alexey-shnaydmiller

that is the main concern about this pull request. A wish to find a way to emit events when block start in order to support steps and attachments within blocks. Otherwise we'll immediately get an issue complaining about that.

Overall, I see that this one did improve integration for spock users in some way, so I'm down to merge it

baev avatar Sep 17 '20 13:09 baev

closed via #838

baev avatar Oct 26 '22 09:10 baev