|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport net.sf.jameleon.LocationAwareTagSupport net.sf.jameleon.JameleonTagSupport net.sf.jameleon.function.FunctionTag net.sf.jameleon.plugin.junit.JUnitFunctionTag net.sf.jameleon.plugin.junit.ExecuteJameleonScriptTag
public class ExecuteJameleonScriptTag
Used to acceptance test Jameleon tags. Executes a Jameleon script and checks various outputs.
Nested Class Summary | |
---|---|
protected class |
ExecuteJameleonScriptTag.FailedRow
|
Field Summary | |
---|---|
protected boolean |
checkOutcomeFailed
Pass only if the script failed |
protected boolean |
checkOutcomePassed
Pass only if the script passed |
protected static boolean |
DEBUG
|
protected org.apache.log4j.varia.DenyAllFilter |
denyAll
|
protected String |
errorMsgContains
A snippet of the error message or reason for that is expected in stdout. |
protected int |
executionTimeGreaterThan
The execution time should be greater than this number if set |
protected int |
executionTimeLessThan
The execution time should be greater than this number if set |
protected StringWriter |
htmlResults
|
protected ExecuteTestCase |
jmln
|
protected String |
lineFailedFunctionId
The functionId of the row that failed |
protected String |
lineFailedReason
The given error message for failure in the HTML results |
protected int |
lineNumFailed
The line # of the script that is stated as failing in the HTML . |
protected TestCaseListener |
listener
|
protected String |
noFailOnFunctionId
A functionId where no failure should occur |
protected boolean |
noTestCaseResults
TODO |
protected int |
numOfFailures
The number of failures that should fail from the script being executed |
protected int |
numOfFunctionsRun
The number of functional points that should be run from the script being executed |
protected int |
numOfTestCasesFailed
The number of test cases that should fail from the script being executed (for when useCSV is set to true in the testcase tag) |
protected int |
numOfTestCasesRun
The number of test cases that should run from the script being executed (for when useCSV is set to true in the testcase tag) |
protected TestCaseCounter |
originalCounter
|
protected static org.dom4j.io.SAXReader |
parser
|
protected TestCaseResult |
result
|
protected File |
script
The script to execute |
protected Writer |
stdOutWriter
|
protected String |
testCaseDocsFile
The name of the generated test case doc file. |
protected String |
testCaseName
A snippet of the error message or reason for that is expected in stdout. |
protected Writer |
timestampedResults
|
Fields inherited from class net.sf.jameleon.function.FunctionTag |
---|
addt, breakPoint, expectException, expectFailure, fResults, functionDelay, functionId, lastFileWritten, log, NO_DELAY, params, postcondition, precondition, st, state, tct, vpt |
Fields inherited from class net.sf.jameleon.JameleonTagSupport |
---|
attributes, broker, contextVars, fp, unsupportedAttributes |
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
columnNumber, elementTagName, lineNumber, scriptFileName |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
ExecuteJameleonScriptTag()
|
Method Summary | |
---|---|
protected void |
assertExecutionTimeGreaterThan(long greaterThanTime)
|
protected void |
assertExecutionTimeLessThan(long lessThanTime)
|
protected void |
assertFunctionIdNotFailed(String noFailOnFunctionId)
|
protected void |
assertHtmlTestCaseName(String expected)
|
protected void |
assertNumOfFailures(int expected)
|
protected void |
assertNumOfFunctionsRun(int expected)
|
protected void |
assertNumOfTestCasesFailed(int expected)
|
protected void |
assertNumOfTestCasesRun(int expected)
|
protected void |
assertOutcomeEquals(String expected)
|
protected void |
assertOutcomeFailed()
|
protected void |
assertOutcomePassed()
|
protected void |
assertTestCaseDocFileEndsWith(String expected)
|
protected String |
executeScript()
|
protected org.dom4j.Document |
getDocument(StringWriter results)
|
protected long |
getExecutionTime()
|
protected List |
getFunctionsRun()
|
protected String |
getHtmlDisplayedOutcome()
|
protected String |
getHtmlDisplayedTestCaseName()
|
protected org.dom4j.Document |
getHtmlDocument()
|
protected String |
getOutcome()
|
protected String |
getRowFromHtml()
|
protected String |
getTestCaseDocFile()
|
protected int |
getTestCasesFailed()
|
protected int |
getTestCasesRun()
|
protected String |
getValueFromElement(String elementName,
String message)
|
void |
setup()
Does setup for plugin-required intialization. |
protected void |
setupEnvironment()
This method is called before anything else is called. |
protected void |
setUpFunctionResults()
|
protected String |
stripHtmlRow()
|
void |
tearDown()
Called when the function is done being executed. |
void |
testBlock()
Contains the actual testing of the function point. |
Methods inherited from class net.sf.jameleon.JameleonTagSupport |
---|
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught |
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport |
---|
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.jelly.Tag |
---|
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent |
Field Detail |
---|
protected static final boolean DEBUG
protected File script
protected boolean checkOutcomePassed
protected boolean checkOutcomeFailed
protected boolean noTestCaseResults
protected int numOfFunctionsRun
protected int numOfFailures
protected String noFailOnFunctionId
protected int numOfTestCasesRun
protected int numOfTestCasesFailed
protected String testCaseDocsFile
protected int executionTimeGreaterThan
protected int executionTimeLessThan
protected int lineNumFailed
protected String lineFailedReason
protected String lineFailedFunctionId
protected String errorMsgContains
protected String testCaseName
protected StringWriter htmlResults
protected Writer timestampedResults
protected ExecuteTestCase jmln
protected org.apache.log4j.varia.DenyAllFilter denyAll
protected static org.dom4j.io.SAXReader parser
protected TestCaseResult result
protected TestCaseCounter originalCounter
protected Writer stdOutWriter
protected TestCaseListener listener
Constructor Detail |
---|
public ExecuteJameleonScriptTag()
Method Detail |
---|
public void testBlock()
FunctionTag
testBlock
in class FunctionTag
protected void setupEnvironment()
FunctionTag
setupEnvironment
in class FunctionTag
public void setup()
FunctionTag
setup
in class FunctionTag
protected void setUpFunctionResults()
setUpFunctionResults
in class FunctionTag
public void tearDown()
FunctionTag
tearDown
in class FunctionTag
protected String executeScript()
protected void assertFunctionIdNotFailed(String noFailOnFunctionId)
protected void assertOutcomeEquals(String expected)
protected void assertOutcomePassed()
protected void assertOutcomeFailed()
protected void assertNumOfFunctionsRun(int expected)
protected void assertNumOfFailures(int expected)
protected void assertNumOfTestCasesRun(int expected)
protected void assertNumOfTestCasesFailed(int expected)
protected void assertTestCaseDocFileEndsWith(String expected)
protected void assertExecutionTimeLessThan(long lessThanTime)
protected void assertExecutionTimeGreaterThan(long greaterThanTime)
protected String getOutcome()
protected List getFunctionsRun()
protected int getTestCasesRun()
protected int getTestCasesFailed()
protected long getExecutionTime()
protected String getTestCaseDocFile()
protected void assertHtmlTestCaseName(String expected)
protected String getHtmlDisplayedOutcome()
protected String getHtmlDisplayedTestCaseName()
protected String stripHtmlRow()
protected String getRowFromHtml()
protected String getValueFromElement(String elementName, String message)
protected org.dom4j.Document getHtmlDocument()
protected org.dom4j.Document getDocument(StringWriter results)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |