GEB-project organization

26 views
Skip to first unread message

Michael...@key-work.de

unread,
Jan 9, 2019, 6:49:07 AM1/9/19
to Geb User Mailing List
Hi there,
we are using GEB in every grails-project we do.
Right now at the beginning of a new project I was thinking about creating a project only containing the GEB-Tests and configuration needed.
Why would I do that?
-> We do execute the GEB-tests via jenkins not only against localhost also towards a remote CI-Instance.
-> We would be able to update GEB-dependencies or even the GEB version without changes to the main project.
So how do you organize your GEB-tests in your project/development environment?
Cheers Michael

Michael Kutz

unread,
Jan 9, 2019, 8:08:07 AM1/9/19
to Geb User Mailing List
Hi Michael,

I'd always suggest to keep the tests with the code but in a separate folder/module. For the tests specify a certain state of the application.

Whenever I change the application, I should have changed the test suite as well and keeping both in one repository, allows me to do that in one single commit.

However, there is no need to keep the Geb tests in the same (Maven or Gradle) project. They could be kept in a separate folder with no further connection to the rest of the repository.

Hope this helps,
Micha

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/fc0c6ffb-3cd7-455c-b642-eb4f90fcfae6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcin Erdmann

unread,
Jan 9, 2019, 3:37:54 PM1/9/19
to geb-...@googlegroups.com
I'd say that it's a very general question, Michael, and one without one clear answer. The only time I worked on browser tests that lived in a separate repository was when I worked on application that was not a monolith - it had multiple front ends and multiple backend services. But even then we ended up bringing everything into one Gradle project using composite builds (https://docs.gradle.org/current/userguide/composite_builds.html).

The fact that you have Geb tests as part of your Grails project should not prevent you from running them against a deployed version of the app if you structure them correctly and configure them properly. It might indeed lead to some dependency conflicts but then if you move them out into a separate subproject then you will have to take care of orchestrating (starting and stoping) the application as part of the test lifecycle yourself. So there are pros and cons to each option, you probably just have to try it and see what works best.

Marcin

Reply all
Reply to author
Forward
0 new messages