rumcajz
13 years agoNew Contributor
LoadUI 2.0.2 - Groovy script through Geb Runner exception
Hi guys,
I have an website accessible through HTTPS (that's why I am using LoadUI 2.0.2, newer versions do not work with HTTPS) that I need to load-test using realistic test cases. The we site does a lot of AJAX calls.
The approach I am trying to take is, automate the test cases using GEB, then run then through LoadUI.
I have installed Eclipse Juno, installed Groovy/Grails Tool Suite, created a Groovy project, added these two jars to classpath:
geb-core-0.7.2.jar
selenium-server-standalone-2.26.0.jar
and wrote a script like this, just to test if this is going to work:
When run from Eclipse, it runs fine. When run from LoadUI (GEB Runner) it gives me an exception in the Output log saying WebDriverException class can't be found.
I added both jars (geb-core and selenium-standalone-server) to LOADUI_HOME_DIR/ext but this does not fix the problem.
Although the class is present in selenium-standalone-*.jar.
Two questions:
1) Is my general approach correct?
2) How can I get this to work?
I've spent the whole week on this and I am really frustraded by such basic functionality being so annoyingly difficult to get to work.
Please help, anybody...
Cheers,
Radek
I have an website accessible through HTTPS (that's why I am using LoadUI 2.0.2, newer versions do not work with HTTPS) that I need to load-test using realistic test cases. The we site does a lot of AJAX calls.
The approach I am trying to take is, automate the test cases using GEB, then run then through LoadUI.
I have installed Eclipse Juno, installed Groovy/Grails Tool Suite, created a Groovy project, added these two jars to classpath:
geb-core-0.7.2.jar
selenium-server-standalone-2.26.0.jar
and wrote a script like this, just to test if this is going to work:
import geb.Browser
import org.openqa.selenium.htmlunit.HtmlUnitDriver
import com.gargoylesoftware.htmlunit.BrowserVersion
HtmlUnitDriver myDriver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3)
myDriver.setJavascriptEnabled(true)
Browser.drive( new Browser( driver: myDriver ) ) {
go "https://xxx.xxx.xxx"
sleep(5000)
$("#loginusername").value("xxxx")
$("#loginpassword").value("xxx")
$("#ext-gen46").click()
sleep(10000)
assert $("#ext-gen189")
}
When run from Eclipse, it runs fine. When run from LoadUI (GEB Runner) it gives me an exception in the Output log saying WebDriverException class can't be found.
I added both jars (geb-core and selenium-standalone-server) to LOADUI_HOME_DIR/ext but this does not fix the problem.
Although the class is present in selenium-standalone-*.jar.
Two questions:
1) Is my general approach correct?
2) How can I get this to work?
I've spent the whole week on this and I am really frustraded by such basic functionality being so annoyingly difficult to get to work.
Please help, anybody...
Cheers,
Radek