-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add feature to run Geb specs with Testcontainers #61
Conversation
This feature enables easy running of geb tests in a container so you don't have to manage driver versions on the host machine.
The common package name used by grails plugins is `grails.plugin.{plugin-name}`.
The common package name used by grails plugins is `grails.plugin.{plugin-name}`.
For `ContainerGebSpec` to work, the serverPort needs to be set. This is done by adding the `@Integration` annotation to the test class.
- Use Gradle testFixtures feature to make test dependencies available to downstream projects without leaking them to the wrong scopes - Refactor `ContainerGebSpec` in co-operation with sbglasius to add more features and make it work without Docker Desktop.
@matrei Looks great. I am apparently not committer on grails, so I cannot do approvals |
Well, you should be. That is an easy fix 😄 |
@sbglasius I have submitted a request and you should see invites to a github team soon. |
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 suspect the servlet-api changes will likely change based on gpc/grails-mail#56 (comment)
After this change this library needs to be referenced with `integrationTestImplementation testFixtures('org.grails.plugins:geb')` but now we are not leaking any test dependencies to downstream projects non-test configurations.
This PR add a
ContainerGebSpec
class that can be used in place ofGebSpec
and that will run the test browser in a container instead of directly on the host machine.