Contact Us
About Us
News
Home
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome,
Guest
. Please
login
or
register
.
November 22, 2008, 03:23:08 am
Username:
Password:
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forgot your password?
Unit testing via soapUI and Groovy
Welcome,
Guest
. Please
login
or
register
.
November 22, 2008, 03:23:08 am
News:
The Forums are up! Welcome to eviware.
Eviware Forum
soapUI
soapUI
Unit testing via soapUI and Groovy
« previous
next »
Pages:
[
1
]
Author
Topic: Unit testing via soapUI and Groovy (Read 502 times)
TomK
soapui pro users
Newbie
Posts: 25
Unit testing via soapUI and Groovy
«
on:
June 13, 2008, 04:40:09 pm »
I tried to run the following groovy Unit Test script in soapUI:
import groovy.util.GroovyTestCase
class MyTest extends GroovyTestCase {
void testSomething() {
assert 1 == 1
assert 2 + 2 == 4 : "We're in trouble, arithmetic is broken"
}
}
And I got the following casting error:
Fri Jun 13 16:26:57 BST 2008:ERROR:groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class MyTest. Reason: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.log4j.Logger@1560b81' with class 'org.apache.log4j.Logger' to class 'java.util.logging.Logger'
Is this a bug or did I do something wrong with the script?
Thanks,
Tom
Logged
TomK
soapui pro users
Newbie
Posts: 25
Re: Unit testing via soapUI and Groovy
«
Reply #1 on:
June 13, 2008, 04:55:50 pm »
I think I managed to narrow it down to the extends instruction.
Logged
omatzura
Administrator
Hero Member
Posts: 1,425
Re: Unit testing via soapUI and Groovy
«
Reply #2 on:
June 15, 2008, 08:05:09 am »
Hi!
exactly where are you entering this script? You probably don't need to wrap the assertions in a method, just enter
assert 1 == 1
assert 2 + 2 == 4 : "We're in trouble, arithmetic is broken"
regards!
/Ole
eviware.com
Logged
TomK
soapui pro users
Newbie
Posts: 25
Re: Unit testing via soapUI and Groovy
«
Reply #3 on:
June 19, 2008, 01:06:36 pm »
I was attempting to create Unit tests for the Java consumer so I have everything in one place.
Logged
omatzura
Administrator
Hero Member
Posts: 1,425
Re: Unit testing via soapUI and Groovy
«
Reply #4 on:
June 19, 2008, 06:57:23 pm »
Hi,
ok.. but exactly where in soapUI are you entering this script? Can you attach a screenshot?
regards!
/Ole
eviware.com
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> eviware general
-----------------------------
soapUI
-----------------------------
=> soapUI
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.2
|
SMF © 2006-2007, Simple Machines LLC
Loading...