Web-Tests using Geb and Spock-Talk

264 views
Skip to first unread message

Michael Kutz

unread,
Feb 13, 2013, 7:30:49 AM2/13/13
to bonn...@googlegroups.com
Hi,

I just started preparing my talk about Web-Tests using Geb/Spock for March 5th. If anyone has any special requests I should cover, please feel free to post here :).

Best regards
Micha

Thomas Ferris Nicolaisen

unread,
Feb 13, 2013, 8:18:14 AM2/13/13
to bonn...@googlegroups.com
Cool! Page objects and maven-integation would be my personal wishes :)

Daniel Westheide

unread,
Feb 18, 2013, 11:33:57 AM2/18/13
to bonn...@googlegroups.com
I second that, but would add the following: testing of single-page web applications. It is quite painful, and maybe there are better ways to do it than what we do. :)

Best regards,

Daniel

Michael Kutz

unread,
Feb 19, 2013, 2:08:13 AM2/19/13
to bonn...@googlegroups.com
Thanks for the feedback so far.

@Thomas: Page objects are in for the nature of Geb, I thank in terms
of Maven it will serve you best to get a well documented working
pom.xml.

@Daniel: Could you give an example for a single-page web application?
Is it simply an application with only one view to test or is it
something like a portal with portlets? If you know one that's running
into the wild that would be most helpful.

2013/2/18 Daniel Westheide <dwest...@googlemail.com>:
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Bonn Agile Meetup" group.
> http://groups.google.com/group/bonnagile?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Bonn Agile Meetup" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bonnagile+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Jürgen Kindler

unread,
Feb 22, 2013, 1:35:22 AM2/22/13
to bonn...@googlegroups.com
  • I wonder if Geb is able to support stuff like drag & drop and other features of rich internet applications.
  • Why isn't Geb done with JavaScript, but Groovy?
  • How does it relate to other tools like Selenium and JavaScript test frameworks (starting with jQuery's test support ...)? (In other words: What's so cool about it ? :-) )
Cheers
  Jürgen

Thomas Ferris Nicolaisen

unread,
Feb 22, 2013, 2:23:41 AM2/22/13
to bonn...@googlegroups.com

Michael Kutz

unread,
Feb 25, 2013, 2:43:50 AM2/25/13
to bonn...@googlegroups.com
Hi Jürgen

2013/2/22 Jürgen Kindler <justb...@googlemail.com>:
> I wonder if Geb is able to support stuff like drag & drop and other features
> of rich internet applications.

It is abel to do some things in that area. I won't cover that in too
much datail though since I haven't experimented with it yet.
If you like here is a direct link to that chapter in the "Book of Geb".
http://www.gebish.org/manual/current/javascript.html#javascript_ajax_and_dynamic_pages

> Why isn't Geb done with JavaScript, but Groovy?

Because it is an extension to Goovy testing and (optionally) Spock. It
is not restricted to testing behaviour of web pages but can do a lot
of other sings besides that. For example you could trigger an action
using Geb (fill a form, click a button), verify the feedback (is that
message present on the page) and than verify the data got to your
backand and caused a notification email using the might of Groovy's
libs.

> How does it relate to other tools like Selenium and JavaScript test
> frameworks (starting with jQuery's test support ...)? (In other words:
> What's so cool about it ? :-) )

It wrappes itself around Selenium, adds some really time saving
concepts like page objects or page definitions and is not only a web
testing framework but an extension for a full featured test framework.
I think that Geb is a great tool for testing a web application as a
whole and not only the frontend of it.
So if you like to test the frontend only, I think there might be
better tools in jQuery and things like that.
If you have more things/interfaces you'd like to test or if you are
with a lot of Java/Groovy developers and not that many wev developers
JS experts etc., than Geb might be the better choice.

Best regards
Micha

>
> Cheers
> Jürgen

Daniel Westheide

unread,
Feb 27, 2013, 9:43:40 AM2/27/13
to bonn...@googlegroups.com
Hey Michael,

sorry for the late response.

When I'm speaking of a single-page web application, I'm referring to rich JavaScript web applications where technically you only have one HTML page, whose DOM is updated a lot, triggered by user interaction or pushed updates from the server. An example of that in the wild may be Trello. It also features drag-and-drop etc, as mentioned by Jürgen.

Best,

Daniel
Message has been deleted

Michael Kutz

unread,
Feb 27, 2013, 10:10:22 AM2/27/13
to bonn...@googlegroups.com
Hi Daniel,

well I must admit I never used Geb for such a case -- we are doing
mostly boring web stuff here ;).

Geb definitely supports dynamic changes on websites. My current idea
for tuesday is a demonstration using Google search page (which
dynamically transforms from search to results page).

I looked up drag and drop support in Geb and it seems to be pretty
easy (see [1]). However this case might be one where JavaScript
testing is more reasonable than using Geb (see my answer to Jürgen's
post).

Best regards
Micha

[1] http://www.gebish.org/manual/0.7.0/navigator.html#drag_and_drop

2013/2/27 Daniel Westheide <dwest...@googlemail.com>:

Michael Kutz

unread,
Feb 27, 2013, 1:19:56 PM2/27/13
to bonn...@googlegroups.com
I just pushed some code that I will use on tuesday on GitHup (see [1]). No need to check it out before the talk but may be helpful especially for maven integration.

[1] https://github.com/mkutz/demonstration/tree/master/geb-spock-demo


Am Mittwoch, 13. Februar 2013 13:30:49 UTC+1 schrieb Michael Kutz:

Thomas Ferris Nicolaisen

unread,
Mar 5, 2013, 9:21:46 AM3/5/13
to bonn...@googlegroups.com
By the way, if anyone has problems getting into the building tonight, my phone number is 0170 113 7705.

Michael Kutz

unread,
Mar 5, 2013, 9:25:04 AM3/5/13
to bonn...@googlegroups.com
You can find code and notes on GitHub:
https://github.com/mkutz/demonstration/tree/master/geb-spock-demo

That's more for after the talk -- no need to look at it before.

2013/3/5 Thomas Ferris Nicolaisen <tfn...@gmail.com>:
> By the way, if anyone has problems getting into the building tonight, my
> phone number is 0170 113 7705.
>

Thomas Ferris Nicolaisen

unread,
Mar 6, 2013, 1:55:16 AM3/6/13
to bonn...@googlegroups.com

Thomas Ferris Nicolaisen

unread,
Mar 6, 2013, 1:55:43 AM3/6/13
to bonn...@googlegroups.com
Again, big thank you to Michael for the great talk! And thanks to Tarent for hosting us once again.

Daniel Westheide

unread,
Mar 6, 2013, 6:12:39 AM3/6/13
to bonn...@googlegroups.com
+1! Thanks to Tarent for hosting, and to Michael for the great talk and live coding. Now I really want to give Geb a try. :)

abilashkar b

unread,
Dec 16, 2014, 7:13:25 AM12/16/14
to bonn...@googlegroups.com

Hi i started Programming in geb u have mentioned page objects here can you please explain about page objects of geb how to create page and acess the page object



Thanks and Regards

Michael Kutz

unread,
Dec 17, 2014, 2:41:32 PM12/17/14
to bonn...@googlegroups.com
Well page objects are pretty well explained at http://www.gebish.org/manual/current/pages.html#pages. Maybe you mixed it up with Test Actors. I explained it in my blog post http://assertagile.de/archives/26_test-actors/. It has no direct connection to Geb but you might get the idea.

Kind regards
Micha

abilashkar b <abilas...@gmail.com> schrieb am Tue Dec 16 2014 at 13:13:26:

Hi i started Programming in geb u have mentioned page objects here can you please explain about page objects of geb how to create page and acess the page object



Thanks and Regards

--
--
You received this message because you are subscribed to the Google
Groups "Bonn Agile Meetup" group.
http://groups.google.com/group/bonnagile?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Bonn Agile Meetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonnagile+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages