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

extraInfo is not displayed for tests without data set #252

Closed Frankie0701 closed 1 year ago

Frankie0701 commented 1 year ago

We notice that after upgrade to 2.5.0-groovy-3.0, the extra info is not displayed for test without data set. Below is a simple test to report some info, but we cannot see "info reported" in our html report, and based on debug, utils.nextSpecExtraInfo(data, feature) is not returning it under this case def 'test info report'() { when: reportInfo("info reported") then: noExceptionThrown() }

renatoathaydes commented 1 year ago

I thought this had been appropriately addressed in https://github.com/renatoathaydes/spock-reports/pull/247 ... I'll have a look.

renatoathaydes commented 1 year ago

Seems like the improved handling of iterations (example-based tests) broke the trivial case :( I need to include more tests for this.

Frankie0701 commented 1 year ago

Hi @renatoathaydes, do you have an ETA for this?

renatoathaydes commented 1 year ago

ETA for fixing this? I was actually hoping you would fix that as it seems it was your PR that caused the issue?

Frankie0701 commented 1 year ago

@renatoathaydes oooh, I thought you changed my fix with a proper fix, didn't check master code yet, sorry, currently we are busy with some internal releases, I might not have time for one or two weeks. Will take a look afterwards

renatoathaydes commented 1 year ago

@Frankie0701 not trying to blame you, but I think this was working before... I imagined that we had tests for this case but if it's not working, obviously we don't, so that's my fault anyway.

I can fix this soon, but just beware I am mostly maintaining this project at this point out of a sense of responsibility, but at least for the moment, I do not intend to work on it much as I have many other projects I find more "interesting", and I stopped using spock-reports a long time ago.

renatoathaydes commented 1 year ago

I tried this on both the groovy 3 and 4 versions. It works with the default MD template, and it works with the HTML report. In fact, there's a test to ensure that this works: https://github.com/renatoathaydes/spock-reports/blob/master/src/test/groovy/com/athaydes/spockframework/report/SpecIncludingExtraInfo.groovy

So, I have to close this issue as I cannot reproduce it.