Ajay9704 commented on issue #14700:
URL: https://github.com/apache/grails-core/issues/14700#issuecomment-3799702548

   @jdaugherty  
   I've been digging deep into this profile tests issue and wanted to share 
what I've discovered and my proposed approach to fix it.
   What I found:
   So I started by tracing back what happened to the old profile tests. Turns 
out there was this commit (9b8fa17) that removed them because they were 
outdated shell scripts that needed reworking.
    The tests were originally moved to a separate repository 
(grails-profiles-tests) but that repo is now archived and marked as 
   
   deprecated.What the old tests actually did:
   
   From what I can see, those shell scripts were pretty comprehensive - they'd 
create actual Grails applications using different profiles (web, plugin, 
rest-api, etc.), run all sorts of grails commands like assemble, package, war, 
and then execute unit/integration/functional tests. 
   They even had Geb/Selenium setup for the functional testing part.
   
   The current situation:
   
   Right now we basically have a gap - no profile tests running in the main 
codebase.
    This seems important because profiles are fundamental to how Grails 
applications are created and structured.
   
   My proposed solution:
   
   I'm thinking we should bring these tests back but do it properly this time - 
convert them from those old shell scripts into proper Gradle tasks that 
integrate cleanly with the existing test infrastructure.
   
   Here's what I'm envisioning:
   
   Create a dedicated test module within grails-core
   Write tests that programmatically generate applications using different 
profiles via grails-forge
   Test all the profile-specific commands and workflows
   Include functional tests using Geb (similar to what existed before)
   Make sure it all runs smoothly as part of the normal Gradle test lifecycle
   
   Why this approach makes sense:
   
   Keeps everything contained within the main repository
   Uses modern Gradle instead of shell scripts
   Integrates with existing test frameworks (Spock/Geb)
   Maintains the comprehensive coverage the old tests provided
   Works cross-platform (Windows/Linux/macOS)
   
   I believe this would restore the testing coverage we lost while modernizing 
the approach.
    The tests would verify that profiles work correctly when people create new 
Grails applications, which seems pretty fundamental to getting the framework 
right.
   
   if my approach makes sense i am ready to open a pr , please let me know if i 
am missing anything 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to