<https://www.linkedin.com/pulse/how-pm-tackled-6-m...
# general
j
j
I would love to hear about the Spec changes - there weren't intentional changes to
@Integration
in 7, but there were historically - maybe they were updating tests that should have been updated previously for their Grails 6 upgrade?
u
Akin to the work, I'll lean on AI to help me answer the technical questions. (Sill just a PM swimming in the deep end... šŸ˜‚) We didn’t treat Grails 7 as introducing a new
@Integration
story for real integration tests. Tests under
src/integration-test
that are meant to boot the app still use `@Integration`; that part stayed the same in intent. What did show up in our diff was mostly: 1. Wrong mix of annotations — Several specs in
src/test
had
@Integration
and unit traits like
ServiceUnitTest
. That’s an invalid combination for Grails’ testing model and started failing with
IllegalStateException
during setup on Grails 7. The fix was to drop
@Integration
from those and keep them as proper unit tests. So those weren’t ā€œGrails 7 changed `@Integration`ā€; they were tests that were already misclassified. 2. Groovy 4, not Grails 7 — One legacy integration-style class still
extends GroovyTestCase
, which Groovy 4 removed. We kept
@Integration
/
@Rollback
/
@Test
and removed the base class. That’s a Groovy upgrade constraint, not an
@Integration
redesign. 3. Broader test modernization — A lot of churn was moving from older patterns (
HibernateSpec
, wrong traits, etc.) to the current
ServiceUnitTest
/
DataTest
guidance. That’s aligned with Grails 6+ testing, but we only had to finish the job when everything was upgraded together (Grails 7 + Groovy 4 + Spring Boot 3 stack). So yes: some of this could have been cleaned up earlier on Grails 6 if we’d already enforced strict separation (unit vs integration) and modern traits. Grails 7 made the bad combinations fail loudly and Groovy 4 forced a few legacy bases off; the
@Integration
annotation itself for real integration tests wasn’t the main story.
j
Ah, this is the perfect response! Thank you. I remember now that I did add some validations on the testing bootstrap that would throw an exception- I was previously affected by developers mixing annotations in the wrong location. By the way, There's a few testing enhancements coming in 7.1 that you may find useful (ie support for multiple integration test phases, DatabaseCleanup instead of rollback, and a simplified http client testing framework)
p
ā¤ļø