|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dtrules.testsupport.ATestHarness
public abstract class ATestHarness
| Field Summary | |
|---|---|
protected AutoDataMap |
autoDataMap
|
protected String |
currentfile
|
protected DataMap |
datamap
|
protected int |
filecnt
|
| Constructor Summary | |
|---|---|
ATestHarness()
|
|
| Method Summary | |
|---|---|
void |
changeReportXML(OutputStream report)
Generate a change report xml to the given output stream. |
String |
compareNodes(XMLTree.Node thisResult,
XMLTree.Node oldResult)
Returns a message about the difference between the nodes. |
void |
compareTestResults()
Compare our new results with a set of past result files. |
PrintStream |
compareTestResultsReport()
Returns standard out by default. |
boolean |
Console()
Do you want to print the report data to the Console as well as to the report file? |
boolean |
coverageReport()
By default, we will produce a coverage report as long as you have trace turned on. |
String |
entrypoint()
Returns "default" as the assumed entry point. |
void |
executeDecisionTables(IRSession session)
Called to execute the Decision Tables. |
AutoDataMap |
getAutoDataMap()
Returns the autoDataMap (or null if there is no autoDataMap) |
String |
getCurrentFile()
Returns the filename of the test set currently under test. |
DataMap |
getDataMap()
|
String |
getDecisionTableName()
An implementation must implement either this method, or getDecsionTableNames(). |
String[] |
getDecisionTableNames()
By default we do not have a list of Decision Table names. |
File[] |
getFiles()
Returns the set of files to run as part of the test, in the order provided. |
String |
getOutputDirectory()
This is where we are going to put the trace files, report files, etc. |
String |
getReportFileName()
The name of the report file. |
String |
getResultDirectory()
By default, we will look for a directory: |
String |
getRulesDirectoryFile()
Default Rules directory file name is DTRules.xml. |
String |
getTestDirectory()
Default directory with all the test files. |
String |
getXMLDirectory()
Path to the XML Directory holding all the XML files for this Rule Set |
int |
harnessVersion()
Returns the TestHarness Version. |
void |
loadData(IRSession session,
String path,
String dataset)
Provides a way for a project to manage how data is loaded into a session. |
String |
mapName()
Return the map Name for this Rule Set. |
boolean |
numbered()
If numbered, we will number the files generated (result files, trace files, etc.) |
void |
printReport(int runNumber,
IRSession session,
PrintStream out)
By default, we will simply dump the entities as the report file. |
String |
referencePath()
Path to the Alternate Configuration File (generally the deployed rule set) to use as a basis to produce a change report XML |
String |
referenceRulesDirectoryFile()
Alternate Configuration File (generally the deployed rule set) to use as a basis to produce a change report XML |
void |
removeIds(XMLTree.Node node)
|
String |
runfile(RulesDirectory rd,
RuleSet rs,
int dfcnt,
String path,
String dataset)
Returns the error if an error is thrown. |
void |
runTests()
Runs all the test files in the TestDirectory; |
boolean |
Trace()
By default, we will trace your code. |
boolean |
Verbose()
If verbose, we are going to print the EDD before we run the rules as well as after we run the rules. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.dtrules.testsupport.ITestHarness |
|---|
getPath, getRulesDirectoryPath, getRuleSetName |
| Field Detail |
|---|
protected DataMap datamap
protected AutoDataMap autoDataMap
protected String currentfile
protected int filecnt
| Constructor Detail |
|---|
public ATestHarness()
| Method Detail |
|---|
public int harnessVersion()
ITestHarness
harnessVersion in interface ITestHarnesspublic String mapName()
mapName in interface ITestHarnesspublic String getCurrentFile()
ITestHarness
getCurrentFile in interface ITestHarness
public void executeDecisionTables(IRSession session)
throws RulesException
ITestHarness
executeDecisionTables in interface ITestHarnessRulesExceptionpublic String getDecisionTableName()
getDecisionTableName in interface ITestHarnesspublic String entrypoint()
entrypoint in interface ITestHarnesspublic String[] getDecisionTableNames()
getDecisionTableNames in interface ITestHarnesspublic DataMap getDataMap()
getDataMap in interface ITestHarnesspublic AutoDataMap getAutoDataMap()
public String getXMLDirectory()
public String getRulesDirectoryFile()
getRulesDirectoryFile in interface ITestHarnesspublic String getTestDirectory()
getTestDirectory in interface ITestHarnesspublic String getOutputDirectory()
getOutputDirectory in interface ITestHarnesspublic boolean Console()
Console in interface ITestHarnesspublic boolean Verbose()
Verbose in interface ITestHarnesspublic boolean numbered()
numbered in interface ITestHarnesspublic boolean Trace()
Trace in interface ITestHarnesspublic boolean coverageReport()
coverageReport in interface ITestHarnesspublic String getReportFileName()
getReportFileName in interface ITestHarnesspublic File[] getFiles()
ITestHarness
getFiles in interface ITestHarnesspublic void runTests()
ITestHarness
runTests in interface ITestHarness
public void loadData(IRSession session,
String path,
String dataset)
throws Exception
ITestHarness
loadData in interface ITestHarnessException
public String runfile(RulesDirectory rd,
RuleSet rs,
int dfcnt,
String path,
String dataset)
rd - rs - dfcnt - path - dataset -
public void printReport(int runNumber,
IRSession session,
PrintStream out)
throws Exception
printReport in interface ITestHarnessrunNumber - the number of the test being runsession - the session of the Rules Engine to use as the basis of the report
Exceptionpublic String referenceRulesDirectoryFile()
ITestHarness
referenceRulesDirectoryFile in interface ITestHarnesspublic String referencePath()
ITestHarness
referencePath in interface ITestHarnesspublic void changeReportXML(OutputStream report)
ITestHarness
changeReportXML in interface ITestHarness
public String compareNodes(XMLTree.Node thisResult,
XMLTree.Node oldResult)
compareNodes in interface ITestHarnesspublic void removeIds(XMLTree.Node node)
public void compareTestResults()
throws Exception
ITestHarness
compareTestResults in interface ITestHarnessExceptionpublic String getResultDirectory()
getResultDirectory in interface ITestHarness
public PrintStream compareTestResultsReport()
throws Exception
compareTestResultsReport in interface ITestHarnessException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||