SmartUnit and ScenarioRunner ANT Tasks

To simplify the usage of the SmartUnit and ScenarioRunner features we have implemented these as ANT tasks now. Previously those features have been provided based on ANT Macros. 

These ANT tasks extend the PCTRun task (https://github.com/Riverside-Software/pct/wiki/PCTRun) and support all attributes of the PCTRun task. In addition SmartUnit or ScenarioRunner specific arguments that we have passed previously as Parameter nodes from the Macro are now implemented as additional attributes. 

The tasks are implemented in the ANT library com-consultingwerk-smartunit-ant-x.y.z.a.jar 

Usage 

In your build.xml ANT script either add

<taskdef name="SmartUnit" classname="com.consultingwerk.ant.SmartUnit"/>  <taskdef name="ScenarioRunner" classname="com.consultingwerk.ant.ScenarioRunner"/> 

or

<taskdef resource="SmartUnit.properties" classpath="<path_to_jar>/com-consultingwerk-smartunit-ant.jar" /> 

Replace <path_to_jar> with the actual file location of the jar package.

 

ScanarioRunner 

To execute a ScenarioRunner Task add the following to your build.xml file: 

<ScenarioRunner testSuite="OERA Test Scenarios"                   tests="Consultingwerk.OeraTests.*"                   outputFile="output\oerascenarios.xml"                   haltOnError="false"                   forceXmlXref="false"                  logFailedTests="true"               graphicalMode="true"  dlcHome="${dlc}"  cpinternal="iso8859-1"  cpstream="iso8859-1"              compileUnderscore="true"  inputchars="200000" assemblies="../ABL/Assemblies"              iniFile="../ABL/ini/progress.ini" token="10000"  dirSize="500000" stackSize="500000" maximumMemory="65534" jsonConfigFile="" catchStop="0">                                   <propath>    <pathelement path="." />  <pathelement path="../ABL" />  <pathelement path="../ABL/OERA" />  <pathelement path="../ABL/src" />  <pathelement path="${dlc}/tty/netlib/OpenEdge.Net.pl" />  </propath>  <DBConnection dbName="sports2000" dbDir="c:/Work/smartcomponents4NET/122_64/DB/sports2000" singleUser="false">  <PCTAlias name="dictdb" />  </DBConnection>  <DBConnection dbName="SmartDB" dbDir="c:/Work/smartcomponents4NET/122_64/DB/SmartDB" singleUser="false" />    <DBConnection dbName="icfdb" dbDir="c:/Work/smartcomponents4NET/122_64/DB/icfdb" singleUser="false" />  </ScenarioRunner> 

 

SmartUnit 

To execute SmartUnit Tests add the following to your build.xml file: 

 

catchStop 

To change the AVM behavior on how STOP conditions are raised from OpenEdge 12 on we recommend using the catchStop parameter. 

To do so add the following XML tag inside the <SmartUnit> tag like this: 

If the parameter has a value of 0, an Progress.Lang.AppError error is raised and caught, and the message Stop condition raised for <test-name> is added as an error to the test result.

This is the behavior seen before OpenEdge 12.0 as well.

If the parameter is used with a value of 1, the Progress.Lang.Stop exception that was raised is caught and added as an error with a more meaningful message to the test result.