-
-
Notifications
You must be signed in to change notification settings - Fork 970
Profile tests gradle 14700 #15351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 7.0.x
Are you sure you want to change the base?
Profile tests gradle 14700 #15351
Conversation
Update date formats for data binding documentation
Signed-off-by: Ajay <chinniyadav9704@gmail.com>
|
@jdaugherty can you let me know anything that needs to be updated and also please trigger the workflows so i can verify and check if anything goes wrong |
|
|
||
| environments { | ||
|
|
||
| // You need to configure in Safari -> Develop -> Allowed Remote Automation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is correct. We containerized Geb and no longer use a local browser for testing.
grails-profiles-tests/.travis.yml
Outdated
| @@ -0,0 +1,23 @@ | |||
| jdk: | |||
| - oraclejdk8 | |||
| addons: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not use travis. Can you please convert this project to a subproject of grails-core?
|
The GebConfig.groovy file configures local browser drivers (Chrome, Firefox, Safari), but since Geb is now containerized, this setup won't work. You should update it to use a remote WebDriver pointing to the containerized browser instance instead. |
I've been working on issue #14700 to bring back the profile testing functionality that was lost when the old shell scripts were removed. This was my first major contribution to Apache Grails, and I wanted to make sure I understood the problem thoroughly before implementing a solution.
What I found
When I dug into this issue, I discovered that the original profile tests were shell scripts that got removed in commit 9b8fa17 because they were outdated and needed reworking. These tests were quite comprehensive - they would create actual Grails applications using different profiles, run various grails commands, and even included functional tests with Geb/Selenium.
My approach
Instead of simply restoring the old shell scripts, I decided to modernize the approach by converting them to proper Gradle-based tests. I created a new grails-profiles-tests module that:
Uses Spock framework for testing (which fits well with the existing Grails ecosystem)
Leverages Grails Forge for programmatic application generation
Tests all the key profile functionality (web, plugin, rest-api profiles)
Includes both unit/integration tests and functional tests
Works cross-platform (Windows, Linux, macOS)
Integrates cleanly with the existing Gradle build system
What's included
The solution provides comprehensive test coverage that verifies:
Profile directory structure creation
Configuration file generation
Profile-specific commands and workflows
Application building and packaging
Functional testing capabilities
I also made sure to preserve the original shell scripts with proper ASF license headers for reference, maintaining backward compatibility while providing the modern testing approach.