Closed treyturner closed 4 years ago
Hi @treyturner, thanks for the issue! I was watching your spock-reports issue and wanted to check if geb-spock-reports also needs to be updated accordingly. Logging is basically non-existant as of now, the template report creation will fail silently.
I suppose that there have been breaking changes in Spock 2.0, so I might need to incorporate those in my template. I should have some time for this the coming weekend. :)
Hey @treyturner, seems like the issue got auto-closed by merging my changes. I have published version 0.3.0-RC1
, please test if everything works as expected now and if not, just reopen the issue. :)
@tilmanginzel It doesn't seem that I'm able to reopen the issue. I can create a new issue if desired, but here's what I'm seeing.
I do get .html spec report generation now, but the artifacts show up together as a group at the bottom of the report (in a group called Unassigned Geb Artifacts) instead of attaching to their respective features. I also notice it's attempting to link three screenshots when only one feature failed. All artifacts have the same name: fixture-failure
. The links to the second and third screenshots are broken, because the artifacts don't exist - presumably because the features passed.
@tilmanginzel It doesn't seem that I'm able to reopen the issue. I can create a new issue if desired, but here's what I'm seeing.
I do get .html spec report generation now, but the artifacts show up together as a group at the bottom of the report (in a group called Unassigned Geb Artifacts) instead of attaching to their respective features. I also notice it's attempting to link three screenshots when only one feature failed. All artifacts have the same name:
fixture-failure
. The links to the second and third screenshots are broken, because the artifacts don't exist - presumably because the features passed.
I'm facing the same issue as well.
Hi @treyturner, @ssulei7, thanks for the info. I can reproduce it with my sample project. No idea how I have missed that. :/
I was able to pin it down to an invalid label name in my generated geb-report-info.json
. Previously, it was the name of the feature, e.g. simple screenshot test
, now it's just always fixture
, so my template cannot find the respective artifacts by that name. Will fix it as soon as possible.
Intermediate result: The test name is being provided by GebReportingSpec#L26 and then used to create a report label.
On previous versions, this value was set with the name of the feature, e.g.:
With the latest version, this value is always null
, resulting in the default value fixture
:
Nothing has changed on the side of Geb in the last years, and I need to investigate what this @Rule
annotation does. There seems to be some upstream issue, that this value is not set properly. Might be related to using a dependency mix of JUnit 4 and JUnit 5.
@Rule TestName
does not work in JUnit 5 anymore, and it seems like Geb does not yet support JUnit 5: https://github.com/geb/issues/issues/539
So I fear we are blocked here for now. :/ Maybe this library could provide it's own GebSpockReportingSpec
, but not sure if that would be the right approach.
Hey @treyturner, @ssulei7, I have found an easy workaround. Spock provides a spock-junit4
compatibility module. Simply adding the dependency provides @Rule TestName
annotation support! Can you check if adding it to your build.gradle
fixes the issue? I would then add some documentation to the README.
dependencies {
testCompile "org.spockframework:spock-core:2.0-M2-groovy-3.0"
testCompile "org.spockframework:spock-junit4:2.0-M2-groovy-3.0"
...
}
Hey @treyturner, @ssulei7, I have found an easy workaround. Spock provides a
spock-junit4
compatibility module. Simply adding the dependency provides@Rule TestName
annotation support! Can you check if adding it to yourbuild.gradle
fixes the issue? I would then add some documentation to the README.dependencies { testCompile "org.spockframework:spock-core:2.0-M2-groovy-3.0" testCompile "org.spockframework:spock-junit4:2.0-M2-groovy-3.0" ... }
That ended up working for me!
Thanks for checking! I have updated the README and will close this issue again. If you encounter anything else, feel free to reopen or create a new one. :)
Hello! I was super stoked that my request for Spock 2.0 support from
spock-reports
was addressed and built into an RC, and that seems to be working great! Unfortunately it also appears that my UI test project which additionally implementsgeb-spock-reports
doesn't seem to play nice with it. Though I get a main index summarizing results of my UI tests, clicking on details for any specification throws a 404 because the linked .html is not generated. By contrast, the AsciiDoc IReportCreator I've implemented seems to be working, so I think the problem is limited togeb-spock-reports
.I'd love to provide additional detail about the failure, but I'm afraid none is apparent - any tips on where I could look or how to enable additional logging for the geb-spock-reports IReportCreator?