Hi all
I am trying to adapt closures in my test scripts and cannot figure out why
Rmxlogin fails but testRmx runs just fine (see code snippet below) . Please
advice.
*import com.canoo.webtest.WebtestCase
import org.junit.Test
public class Rmxtest extends WebtestCase
{
def Rmxlogin = {invoke url: "http://xx.com", description: "Launch test
URL"}
void testRmxlogin(){
webtest("....Login ..."){
Rmxlogin.delegate = this
Rmxlogin.resolveStrategy = Closure.DELEGATE_FIRST
Rmxlogin()
}
}
/**
void testRmx()
{
webtest("Verify login process")
{
invoke url: "http://xx.com", description: "Launch test URL"
}
}
*/
}*
Problem: failed to create task or type Rmxlogin
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.