|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cornell.cs.sam.ui.TestScript
public class TestScript
This class holds an execution script to test multiple sam files and report the results.
Nested Class Summary | |
---|---|
static class |
TestScript.Test
Represents one single test |
static class |
TestScript.TestResult
This stores results from a test case run |
static class |
TestScript.TestScriptException
|
static class |
TestScript.TestThread
|
Field Summary | |
---|---|
protected boolean |
autoSort
|
protected Memory |
mem
|
protected Processor |
proc
|
protected java.io.File |
sourceFile
|
protected Sys |
sys
|
protected java.util.List<java.lang.String> |
testNames
|
protected java.util.List<TestScript.Test> |
tests
|
Constructor Summary | |
---|---|
TestScript()
Creates a new TestScript |
Method Summary | |
---|---|
protected static void |
addIO(org.w3c.dom.Document xmlDoc,
org.w3c.dom.Element testElem,
java.lang.String classParam,
TestScript.Test.DataType o)
|
protected static void |
addIOType(org.w3c.dom.Document xmlDoc,
org.w3c.dom.Element testElem,
java.lang.String classParam,
java.util.Collection<TestScript.Test.DataType> coll)
|
boolean |
addTest(TestScript.Test t)
Add a test |
void |
clearTests()
Remove all tests from this script |
void |
deleteTest(int i)
Delete the test case |
void |
enableAutoSorting(boolean sort)
Set this to true to enable the test script to be automatically sorted by test file name in alphabetical order |
java.io.File |
getSourceFile()
Returns the file this TestScript is using |
TestScript.Test |
getTest(java.lang.String testName)
Return a specific test |
java.util.List<java.lang.String> |
getTestNames()
Return the list of test names |
java.util.List<TestScript.Test> |
getTests()
Return the vector of the tests |
boolean |
isAutoSortingEnabled()
Returns whether auto sorting is enabled |
void |
load(java.io.InputStream toParse)
Loads the provided input stream |
protected TestScript.Test |
processTest(org.w3c.dom.Element e)
Processes an individual test element |
void |
save(java.io.File toSave)
Saves the test script to a file |
void |
setSourceFile(java.io.File file)
Sets the file this testscript will load |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Sys sys
protected Processor proc
protected Memory mem
protected java.util.List<java.lang.String> testNames
protected java.util.List<TestScript.Test> tests
protected java.io.File sourceFile
protected boolean autoSort
Constructor Detail |
---|
public TestScript()
Method Detail |
---|
public java.io.File getSourceFile()
public void setSourceFile(java.io.File file)
file
- the file to loadpublic void load(java.io.InputStream toParse) throws TestScript.TestScriptException
toParse
- The stream on which the XML file can be read
TestScript.TestScriptException
- if there is a problem parsing the XML fileprotected TestScript.Test processTest(org.w3c.dom.Element e) throws TestScript.TestScriptException
TestScript.TestScriptException
public boolean isAutoSortingEnabled()
public void enableAutoSorting(boolean sort)
public void save(java.io.File toSave) throws TestScript.TestScriptException
toSave
- the file to save the XML test script to
TestScript.TestScriptException
- if there is an error writing the fileprotected static void addIOType(org.w3c.dom.Document xmlDoc, org.w3c.dom.Element testElem, java.lang.String classParam, java.util.Collection<TestScript.Test.DataType> coll)
protected static void addIO(org.w3c.dom.Document xmlDoc, org.w3c.dom.Element testElem, java.lang.String classParam, TestScript.Test.DataType o)
public boolean addTest(TestScript.Test t)
public java.util.List<TestScript.Test> getTests()
public java.util.List<java.lang.String> getTestNames()
public TestScript.Test getTest(java.lang.String testName)
name
- the name of the test
public void clearTests()
public void deleteTest(int i)
TestScript.Test#delete()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |