Grails splitting geb tests

25 views
Skip to first unread message

Peter Moser

unread,
Mar 9, 2016, 2:51:08 AM3/9/16
to Geb Development Mailing List

I am new to selenium tests in grails. I am using geb and spock for testing.

I want to split my test plans into some smaller test plans. I want to know if it's possible to make a spec which calls other specs?

Marcin Erdmann

unread,
Mar 9, 2016, 4:06:17 AM3/9/16
to geb...@googlegroups.com, Geb User Mailing List
Hi Peter,

Can you please explain what you're after in a bit more detail? What do you mean by a "test plan"? A test class or a test suite? Why exactly do you want to call specs from specs? Which Grails version are you using - 2.x or 3.x?

Marcin

P.s. I'm forwarding this thread to the user group (https://groups.google.com/forum/#!forum/geb-user) beacuse it's better suited for this kind of question. Please reply on the user list.

On Wed, Mar 9, 2016 at 7:51 AM, Peter Moser <irk...@gmail.com> wrote:

I am new to selenium tests in grails. I am using geb and spock for testing.

I want to split my test plans into some smaller test plans. I want to know if it's possible to make a spec which calls other specs?

--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+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-dev/bc8c68bf-7023-402d-9ab0-9c2b2baac161%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Moser

unread,
Mar 10, 2016, 2:26:16 AM3/10/16
to geb...@googlegroups.com
Hi, by test plan, I mean a spec. I want to make simple specs for testing different parts of my application. For example, I have a spec which tests changing the user settings, another spec is changing some data and so on. But in the end, I want to make a spec which executes Spec a, Spec b and so on. I know I can achieve this with command line parameters. But is it possible to do this in a spec?
Grails Version 2.x
Best regards, Peter.

--
You received this message because you are subscribed to a topic in the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geb-dev/JgUTCmp0iAc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geb-dev+u...@googlegroups.com.

To post to this group, send email to geb...@googlegroups.com.

Marcin Erdmann

unread,
Mar 13, 2016, 9:21:57 AM3/13/16
to geb...@googlegroups.com
Sorry but I struggle to follow. Why do you want to reuse the specifications in other specifications? That's not possible, a specification is a standalone thing. You might want to put your reusable code outside of specifications, into a separate class for example, and then call it from multiple specifications. That would work.

Peter Moser

unread,
Mar 13, 2016, 2:57:14 PM3/13/16
to geb...@googlegroups.com
Hi,

My idea was to make small specs which test only small parts of my application. Then I want to make different testplans which includes some of the small specs. When it is not possible to include a spec in another spec, I have to make my testplans from command line. 

Thank you for your answer.

Best regards,
Peter

Stefan Hildebrandt

unread,
Mar 13, 2016, 4:06:28 PM3/13/16
to geb...@googlegroups.com
Hi,
put all complex interactions and assertions to the pages (and modules). So you are able to create simple specs with reuse of this code.

best regards
Stefan

Peter Moser

unread,
Mar 25, 2016, 4:02:06 PM3/25/16
to Geb Development Mailing List, geb...@consulting.hildebrandt.tk
Thank you, this was a good idea. I have now real small specs and the most logic is in the page
Reply all
Reply to author
Forward
0 new messages