|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.canoo.webtest.steps.Step
com.canoo.webtest.extension.ScriptStep
public class ScriptStep
Wrapper class for the ant script command.
| Field Summary |
|---|
| Fields inherited from class com.canoo.webtest.steps.Step |
|---|
DEFAULT_DESCRIPTION, ELEMENT_ATTRIBUTE_ID, ELEMENT_ATTRIBUTE_NAME, PROPERTY_TYPE_ANT, PROPERTY_TYPE_ANT_STRICT, PROPERTY_TYPE_DEFAULT, PROPERTY_TYPE_DYNAMIC |
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
ScriptStep()
|
|
| Method Summary | |
|---|---|
protected void |
addComputedParameters(Map map)
override to add actual attribute values to the reporting |
void |
addText(String text)
The script text if inlined. |
void |
doExecute()
Perform the step's actual work. |
static String |
evalByRunner(ResetScriptRunner runner,
String script,
Step step)
|
static String |
evalScriptExpression(Context context,
String expression,
Step step)
|
static void |
executeByRunner(ResetScriptRunner runner,
String script,
Step step,
Project project)
|
String |
getKeep()
|
String |
getLanguage()
|
File |
getSrc()
|
boolean |
isKeep()
|
void |
setKeep(String keep)
Flag to indicate that the scripting engine should be kept after the step completes and re-used for future script steps. |
void |
setLanguage(String language)
Defines the language (required). |
void |
setSrc(File fileName)
Defines the src file containing scripting code (optional). |
protected void |
verifyParameters()
Verify that language is set |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptStep()
| Method Detail |
|---|
public void doExecute()
throws Exception
doExecute in class StepException - if a problem occurred
public static String evalScriptExpression(Context context,
String expression,
Step step)
public static void executeByRunner(ResetScriptRunner runner,
String script,
Step step,
Project project)
throws BuildException
BuildException
public static String evalByRunner(ResetScriptRunner runner,
String script,
Step step)
throws BuildException
BuildExceptionprotected void verifyParameters()
verifyParameters in class StepStepExecutionException - if a mandatory attribute is not setprotected void addComputedParameters(Map map)
addComputedParameters in class Stepmap - the map in which the parameters should be addedpublic void setLanguage(String language)
language - Sets the scripting language.public String getLanguage()
public void setSrc(File fileName)
fileName - Sets the name of the file containing script code.public File getSrc()
public void setKeep(String keep)
keep - Indicates that the script engine should be kept for future steps.public String getKeep()
public boolean isKeep()
public void addText(String text)
text - The nested scripting code.
|
Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||