TomK
16 years agoContributor
Unit testing via soapUI and Groovy
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
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