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

Tests with parameters but without @Unroll will have extraInfo all grouped to first iteration #244

Closed Frankie0701 closed 1 year ago

Frankie0701 commented 1 year ago

We notice after upgrade to 2.3.2-groovy-3.0, our tests without @Unroll that has extarInfo for each iteration will have all extraInfo only displayed in first iteration, and leave rest iterations' extraInfo blank. For example, with following test, you can see the spec template screenshot that extra info are displayed in first iteration including all info from the rest iterations. This works fine before our upgrade from 1.7.1 def 'test without unroll'() { when: reportInfo("extra info for iteration: " + input) ` then: true where: input << [1, 2] }` image

Frankie0701 commented 1 year ago

Hi @renatoathaydes , I want to create a PR for this, but I don't have the permission to create a branch for this, could you help me with it? thanks

renatoathaydes commented 1 year ago

Done.

git fetch origin
git checkout 244-tests-with-parameters-but-without-unroll-will-have-extrainfo-all-grouped-to-first-iteration
Frankie0701 commented 1 year ago

Sorry @renatoathaydes , I still get 403 when push my changes to 244-tests-with-parameters-but-without-unroll-will-have-extrainfo-all-grouped-to-first-iteration, I have double checked my personal access token, it should be fine, workflow is included. What might go wrong?

Frankie0701 commented 1 year ago

HI @renatoathaydes , sorry I did it in the wrong way, and I have fixed the problem. Could you help to review my PR when you have time? thanks

Frankie0701 commented 1 year ago

Hi @renatoathaydes, Thx for the review, do you have any ETA when will next release happen?

renatoathaydes commented 1 year ago

I've found a reliable way to know when a spec is rolledup/unrolled, which fixed the issue for good...

I reverted the change to the main HTML report creator so that we do not prepend text to each "extra info" message. That was not needed.

But there are a few more bugs I want to fix before the next release. Hoping to release within a few days.

Frankie0701 commented 1 year ago

Hi @renatoathaydes , I saw you did a release of 2.5.0-groovy-4.0 last week, will you do another one for 2.3.X-groovy-3.0? for us, there is some extra work to do to upgrade to groovy-4, it would be easier for us to have a groovy-3 compatible version

renatoathaydes commented 1 year ago

Hi @Frankie0701 . Yeah, I did not update the groovy3 branch because it takes some work to do it and I was not too keen on keeping that branch up-to-date... but I can do it if you want it, just need to cherrypick a few commits I guess.

renatoathaydes commented 1 year ago

It was not hard to do it, so I released 2.5.0-groovy-3.0 on Maven Central. It passed all tests on Java 8, 11, and 17, and the only differences between that and 2.5.0-groovy-4.0 are the dependency versions!

It may take a few hours for Maven Central to make the new version available.

Frankie0701 commented 1 year ago

Hi @renatoathaydes , many thx for the release. Tried in our project, works perfect! thanks again for the effort!