public GroovyActionDefinition groovy(Resource scriptResource) {
GroovyAction action = new GroovyAction();
try {
action.setScript(FileUtils.readToString(scriptResource));
} catch (IOException e) {
throw new CitrusRuntimeException("Failed to read script resource", e);
}
testCase.addTestAction(action);
return new GroovyActionDefinition(action);