AOEpeople / geb-spock-reports

Integrates Geb screenshots into the spock-reports library
Apache License 2.0
36 stars 11 forks source link

listener depends on label format in geb.spock.GebReportingSpec.createReportLabel #5

Closed rosemead closed 6 years ago

rosemead commented 6 years ago

Reports generated by calling browser.report directly will not have that label format, and will fail the listener.

https://github.com/AOEpeople/geb-spock-reports/blob/2e2bb52ad6d9e516ad0651e0dc35747a03acc801/src/main/groovy/com/aoe/gebspockreports/GebReportingListener.groovy#L35

tilmanginzel commented 6 years ago

Hi @rosemead, good find. What is your idea on how to solve that? I guess these reports should be ignored if it is not possible to extract the necessary information from the label. But I will take a look at the label format when directly using browser.report, maybe the information is there, just formatted differently.

If you have another solution on how to extract all necessary information without using the label, I will happily change that. Unfortunately I don't think that this is possible at the moment.

tilmanginzel commented 6 years ago

Release v0.1.4 now catches exceptions in the GebReportingListener and therefore ignores the invalid label formats. Unfortunately I do not see any possibility to map those invalid labels to the actual feature and report, so ignoring them seems to be the only solution.