gradle+spock+geb

54 views
Skip to first unread message

alex24f...@gmail.com

unread,
Oct 9, 2018, 9:14:43 AM10/9/18
to Geb User Mailing List
Hi, is there any way to execute geb-test parallel?

I was not able to finde any possible solution.

Thanks for help 

Marcin Erdmann

unread,
Oct 21, 2018, 10:35:59 AM10/21/18
to geb-...@googlegroups.com
Yes there is and I've done that a number of times in the past. I parallelise Geb tests by forking multiple test JVMs. This can be done by setting maxParallelForks (https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:maxParallelForks) on the Gradle test task running Geb tests.

Marcin

--
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/894922ab-255b-4726-b0f0-82fa1defbcd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

alex24f...@gmail.com

unread,
Oct 25, 2018, 4:33:56 AM10/25/18
to Geb User Mailing List
Thanks Marcin.

The maxParallelForks is executing TestClasses parallel.

Is there a way to run parallel tests in one testclass? 

Example: 
I own a class with 10 tests which I would like to run parallel to each other

Marcin Erdmann

unread,
Oct 25, 2018, 9:27:00 AM10/25/18
to geb-...@googlegroups.com
I'm sure there is. I just wouldn't do it because it's asking for trouble - you will potentially end up with thread safety issues. I don't think JUnit was designed with running tests in parallel in mind.

Marcin

Reply all
Reply to author
Forward
0 new messages