Log Message: |
Implemented: Implement Groovy test in testtools (OFBIZ-9996)
With the minilang deprecation and the migration to groovy, I implemented on the ofbiz testtools the possibility to use groovy for write new integration test or convert current simple xml test.
Now you can define a new element as child of test-group on your xml test-suite file like
<groovy-test-suite name=simple location=component://base/groovyScript/test/SimpleTests.groovy/>
To Write your test, you need to create a Groovy class that extends GroovyScriptTestCase class :
import org.apache.ofbiz.testtools.GroovyScriptTestCase
class BaseTest extends GroovyScriptTestCase {
void testTrue() {
assert 1, 1
}
}
All your function will execute as TestCase.
For more information on groovy specific testing language see http://groovy-lang.org/testing.html
At this time the OFBiz Groovy DSL isn't supported to write groovy test case but you have access to the delegator and the disphatcher as native class variable.
|