| java.lang.Object com.metaboss.sdlctools.applications.systemtester.ScenarioRunner
ScenarioRunner | public class ScenarioRunner (Code) | | This class runs a single test scenario (note that scenarion may in fact consist of many test steps.
It should be called from command line and needs following arguments
- -scenarioPath=<test scenario directory path>. If it is not specified - the current working directory is used.
All xml files residing in this directory (apart from possible specimen xml file described below) will be read, sorted in alphabetical order
and executed in sequence.
- -scenarioName=<a name of this scenario>. If it is not specified - "UnnamedScenario" name is used.
This is the name which is used to form a core of the log file name and also for the console output.
For example scenarioName might be 'MyRegressionTest' or 'AcceptanceScenarios' etc. The actual log file
name is formed by concatenating scenarioName, scenarioRunName and timestamp.
- -scenarioRunName=<a name of the run of this scenario>. If it is not specified the empty string is used.
This is the name which is used to form a suffix of the log file name and also for the console output.
For example scenarioRunName might be 'JBossClient' or 'OracleInprocess' etc. The actual log file
name is formed by concatenating scenarioName, scenarioRunName and timestamp.
- -clientPath=<system clients configuration directory path>. This directory should contain subdirectories with
names <EnterpriseName>.<SystemName>.<ServicemoduleName>. When runner parses scenarios it uses
namespace information from the test input documents to understand which client is needed, loads
contents of the matching directory in the specified path and executes servicemodule's xmlstrings adapter.
This basically allows for each client to be configurred and versioned separately (i.e. it may have different
versions of libraries etc...) If path is not given, path from under current directory is assumed. If
directory is not found - attempt is made to load adapter from the system classpath
- -loggingPath=<test logs directory path>. While runner is running - it outputs the log file (one per run).
The name of this file is formed from the scenarioName (see argument description above) and
date and time of the test. This ensures recognisable name of the log file and uniqueness of the names
even if same test is run more than once in quick succession.
- -specimenFile=<path and name of the scenario log specimen file>. This parameter
triggers the test scenario validation against specified specimen file. This validation takes place
at the end of the scenario run. The specimen file is simply a previous good log file (i.e. result of good scenario run)
with all volotile data removed from it. Comparison process will ensure that all data in specimen file
is present in the log file being validated, but not visa versa. If this file is not specified
validation of the test data against the specimen is not performed.
- -logTestPerformance=<true or flse>. Default is true.
This argument controls output of the performance statistics records into the scenario log. Note that
by its nature performance data is volotile and there is usually a lot of it in the log. Therefore
the presence of the performance data in the log makes it a bad candidate for a specimen.
Unless you want to do lots of manual editing (i.e. deleting of performance data from the log file)
it is a good idea to switch off performance records output when capturing the log to be used as a specimen.
|
Method Summary | |
public static void | main(String[] args) | public void | processInclude(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext) | public void | processOperationPlan(Element pTargetElement, Element pOperationPlanElement, TemplateContext pTemplateContext) | public void | processSubscriptionPlan(Element pTargetElement, Element pSubscriptionPlanElement, TemplateContext pTemplateContext) | public void | processTemplate(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext) | public void | processTemplateXSLDocument(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext, Element pSourceElement) | public void | processTemplateXSLText(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext, Element pSourceElement) | public void | processValueOf(Element pTargetElement, Element pValueOfElement, TemplateContext pTemplateContext) | public void | processValueOfTimestamp(Element pTargetElement, Element pTimestampElement, TemplateContext pTemplateContext) | public synchronized boolean | runScenario() | public void | saveScenarioLogIfNecessary() | public synchronized void | setClientPath(String pClientPath) | public synchronized void | setIncludePath(String pIncludePath) | public synchronized void | setLogTestPerformance(boolean pNeedToLog) | public synchronized void | setLoggingPath(String pLoggingPath) | public synchronized void | setScenarioName(String pScenarioName) | public synchronized void | setScenarioPath(String pScenarioPath) | public synchronized void | setScenarioRunName(String pScenarioRunName) | public synchronized void | setSpecimenFile(String pSpecimenFile) |
processInclude | public void processInclude(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext) throws Exception(Code) | | Include processor functionality, processes given Include element and populates results back into the target element
|
processOperationPlan | public void processOperationPlan(Element pTargetElement, Element pOperationPlanElement, TemplateContext pTemplateContext) throws Exception(Code) | | Operation invocation functionality, processes given Operation element and populates results back into the target element
|
processSubscriptionPlan | public void processSubscriptionPlan(Element pTargetElement, Element pSubscriptionPlanElement, TemplateContext pTemplateContext) throws Exception(Code) | | Subscription invocation functionality, processes given SubscriptionPlan element and populates results back into the target element
|
processTemplate | public void processTemplate(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext) throws Exception(Code) | | Template processor functionality, processes given Template element and populates results back into the target element
|
processTemplateXSLDocument | public void processTemplateXSLDocument(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext, Element pSourceElement) throws Exception(Code) | | Template processor functionality, processes given Template element and populates results back into the target element
|
processTemplateXSLText | public void processTemplateXSLText(Element pTargetElement, Element pTemplateElement, TemplateContext pTemplateContext, Element pSourceElement) throws Exception(Code) | | Template processor functionality, processes given Template element and populates results back into the target element
|
processValueOf | public void processValueOf(Element pTargetElement, Element pValueOfElement, TemplateContext pTemplateContext) throws Exception(Code) | | Special functionality, processes given ValueOf element and populates results into the target element
|
processValueOfTimestamp | public void processValueOfTimestamp(Element pTargetElement, Element pTimestampElement, TemplateContext pTemplateContext) throws Exception(Code) | | Special functionality, processes given Timestamp element and populates results into the target element
|
runScenario | public synchronized boolean runScenario() throws Exception(Code) | | Runs scenario and returns true if test was successfull and false otherwise
|
saveScenarioLogIfNecessary | public void saveScenarioLogIfNecessary() throws Exception(Code) | | |
setClientPath | public synchronized void setClientPath(String pClientPath)(Code) | | |
setIncludePath | public synchronized void setIncludePath(String pIncludePath)(Code) | | |
setLogTestPerformance | public synchronized void setLogTestPerformance(boolean pNeedToLog)(Code) | | |
setLoggingPath | public synchronized void setLoggingPath(String pLoggingPath)(Code) | | |
setScenarioName | public synchronized void setScenarioName(String pScenarioName)(Code) | | |
setScenarioPath | public synchronized void setScenarioPath(String pScenarioPath)(Code) | | |
setScenarioRunName | public synchronized void setScenarioRunName(String pScenarioRunName)(Code) | | |
setSpecimenFile | public synchronized void setSpecimenFile(String pSpecimenFile)(Code) | | |
|
|