Skip to content

Profile tests gradle 14700#15351

Draft
Ajay9704 wants to merge 9 commits intoapache:7.0.xfrom
Ajay9704:profile-tests-gradle-14700
Draft

Profile tests gradle 14700#15351
Ajay9704 wants to merge 9 commits intoapache:7.0.xfrom
Ajay9704:profile-tests-gradle-14700

Conversation

@Ajay9704
Copy link
Copy Markdown
Contributor

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.

Ajay9704 and others added 3 commits January 9, 2026 12:10
Update date formats for data binding documentation
Signed-off-by: Ajay <chinniyadav9704@gmail.com>
@Ajay9704
Copy link
Copy Markdown
Contributor Author

@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
Copy link
Copy Markdown
Contributor

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.

@@ -0,0 +1,23 @@
jdk:
- oraclejdk8
addons:
Copy link
Copy Markdown
Contributor

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?

@bito-code-review
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants