renatoathaydes / spock-reports

This project creates a global extension to Spock to create test reports.
Apache License 2.0
273 stars 68 forks source link

Report is not generated when all class tests have @ignore #242

Open AnthonyTonda opened 1 year ago

AnthonyTonda commented 1 year ago

Given all classes have @ignore When I run these classes Then spock report generates no report at all But I would expect to have the generated report where I see the list of tests didn’t run

Spock Version: 1.3-groovy-2.4 Spock Report Version: 1.2.7

renatoathaydes commented 1 year ago

I agree, and am surprised that's the case! If you would like to submit a pull request, this should be easy to fix.

Otherwise, I may have a look within a couple of months, given I am too busy at the moment with other things.

AnthonyTonda commented 1 year ago

Hi Renato, will try to raise a PR ;) to which branch I should select for raising the PR ? to dev ?

renatoathaydes commented 1 year ago

Yes, dev, I've just updated that!

renatoathaydes commented 1 year ago

I tried to fix this issue, but it seems impossible because Spock is not even calling spock-reports' extension when the spec is fully ignored.

That looks like a bug in Spock, because extensions have a method, which I've implemented, for this case:

    @Override
    void specSkipped( SpecInfo spec )
AnthonyTonda commented 1 year ago

Thank for looking at it.

renatoathaydes commented 1 year ago

Reported to Spock: https://github.com/spockframework/spock/issues/1662

renatoathaydes commented 1 year ago

The bug is fixed on the Spock side, just waiting for the PR to be merged and the fix released.