Getting Started with Geb

722 views
Skip to first unread message

Akshay Ashtavadhani

unread,
Sep 2, 2015, 6:12:15 AM9/2/15
to Geb User Mailing List
Hello,
   I am new to Geb and groovy having knowledge of selenium webdriver. I have imported examples available, in intellij IDE and able to run it successfully. 
Now i want to create my own scripts and want to play with that. For now i am trying basic script to just open a browser with url.
 
Following are some questions i am having

1] Will Geb works standalone with groovy or it will required Spock or other framework knowledge.
2] Do we have any doc for step by step creation and execution of the basic geb script.

Following are the steps i have followed in eclipse to run basic script. But i am getting error(pasted here)
1] Created Groovy project
2] Imported geb-core-0.12.2 jar and also jars required for webdriver
3] code written 

import geb.Browser;

Browser.drive {
}
Error:
  Caught: java.lang.NoClassDefFoundError: geb/error/GebException
java.lang.NoClassDefFoundError: geb/error/GebException
Caused by: java.lang.ClassNotFoundException: geb.error.GebException

Can anybody please let me know what else i will required to make the scripts run.
Thanks in advance.

Marcin Erdmann

unread,
Sep 4, 2015, 4:19:45 AM9/4/15
to geb-...@googlegroups.com
1) Work is a browser automation framework and hence does not need/depend any testing frameworks (be it JUnit, Spock, Cucumber) to be used. Standalone Groovy is enough.
2) The Book of Geb (http://www.gebish.org/manual/current) is all the available documentation.

The errors you are seeing in Eclipse are due to missing dependencies. You should not resolve them by hand but use a build framework to do it for you as it's less error prone. I would suggest Gradle but Maven can do the job for you as well if you dare. There is an example Maven project here: https://github.com/geb/geb-example-maven and a Gradle one here: https://github.com/geb/geb-example-gradle. You can also have a look at my stackoverflow response about setting up a Geb project with Gradle from scratch in IntelliJ (i.e. without Gradle installed on your machine): http://stackoverflow.com/questions/24039574/linkage-error-with-geb/24195114#24195114, just please bear in mind the the answer is old and you might need to update dependency versions (latest Gradle is 2.6 for example).

--
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/a37f51aa-b61a-47ff-b6e6-14bef90dd920%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

i1

unread,
Sep 18, 2015, 2:41:32 AM9/18/15
to Geb User Mailing List


Hello
  I like to do performance testing using selenium,can you give some inputs to learn and do selenium performance testing.

Stefan Hildebrandt

unread,
Sep 18, 2015, 3:02:25 AM9/18/15
to geb-...@googlegroups.com
Hi,

as introduction:

short summary:
you can generate requests and some load, but you cannot measure times on client-side (latency within selenium), so you must use other tools like
 

best regards

stefan


--
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.

i1

unread,
Sep 18, 2015, 7:41:12 AM9/18/15
to Geb User Mailing List, geb...@consulting.hildebrandt.tk
Thank you Stefan Hildebrandt , is there any other better tools to do performance testing other than selenium?

Brian Kotek

unread,
Sep 18, 2015, 4:37:29 PM9/18/15
to Geb User Mailing List, geb...@consulting.hildebrandt.tk
What do you mean by "performance testing"? Do you mean load testing?

On Fri, Sep 18, 2015 at 7:41 AM, i1 <indh...@vyoog.com> wrote:
Thank you Stefan Hildebrandt , is there any other better tools to do performance testing other than selenium?

--
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.

i1

unread,
Sep 18, 2015, 11:52:42 PM9/18/15
to Geb User Mailing List, geb...@consulting.hildebrandt.tk
Yes brian428,Load runner testing.

Colin Harrington

unread,
Sep 19, 2015, 12:53:40 AM9/19/15
to geb-...@googlegroups.com, geb...@consulting.hildebrandt.tk
Geb/Webdriver isn't the right tool for running load tests.  Webdriver launches a real browser and controls it via code.  Scaling up to hundreds of browser instances is problematic, let alone thousands or beyond.  Browsers aren't known for their light weight memory footprint and typically require a lot of resources.

Even though Geb/Webdriver isn't the right choice for running load tests, it can be very useful for helping generate the load testing scripts.  

On previous projects, I've used Geb tests to generate traffic that was recorded by a tool like JMeter.  If you record the HTTP traffic generated by Geb/Webdriver, you can use that to execute your load tests.  Once you have a good recorded session (or set of sessions variations), you can then pick out the variables and scale up to do your load tests.

This worked out well because the Geb tests were kept in sync with our codebase (Continuous Integration, Automated testing)  I would have loved to do load testing on every build, but that wasn't a requirement for the projects.   The little bit of work to record the HTTP traffic was worth it each time we re-evaluated the application and environment's performance.

Hope that helps

~ Colin



Colin Harrington
colin.ha...@gmail.com

On Fri, Sep 18, 2015 at 10:52 PM, i1 <indh...@vyoog.com> wrote:
Yes brian428,Load runner testing.

--
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.

i1

unread,
Sep 19, 2015, 1:36:18 AM9/19/15
to Geb User Mailing List, geb...@consulting.hildebrandt.tk
Thank you. At present i have to do performance testing for an ERP application.So give the suggestions which would be the best for doing? since am new to this i don't have any idea about Performance testing in Groovy.

Brian Kotek

unread,
Sep 19, 2015, 2:28:34 PM9/19/15
to Geb User Mailing List
It sounds like you need to do some general learning and research on load testing in general. There's really no way that a few posts on a mailing list are going to give you enough information to do this.

On Sat, Sep 19, 2015 at 1:36 AM, i1 <indh...@vyoog.com> wrote:
Thank you. At present i have to do performance testing for an ERP application.So give the suggestions which would be the best for doing? since am new to this i don't have any idea about Performance testing in Groovy.

--
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.
Reply all
Reply to author
Forward
0 new messages