Declaration source
{attribute 'qualified_only'}
VAR_GLOBAL CONSTANT
MaxNumberOfTestSuites : UINT := 1000;
MaxNumberOfTestsForEachTestSuite : UINT := 100;
MaxNumberOfAssertsForEachTestSuite : UINT := 1000;
(* TcUnit logs complete test results. These include:
- Number of test suites
- Number of tests
- Number of successful tests
- Number of failed tests
- Any eventual failed assertion (with the expected & actual value plus an user defined message)
These are all printed to the ADS logger (Visual Studio error list) marked with ERROR criticality
On top of this TcUnit also reports some statistics/extended information with HINT/INFO criticality.
These statistics are more detailed results of the tests. This information is used when results are
being collected by an external software (such as TcUnit-Runner) to do for example Jenkins integration.
This extra information however takes time to print, so by setting the following parameter to FALSE
it will speed up TcUnit finishing. *)
LogExtendedResults : BOOL := TRUE;
(* Enable (TRUE) or disable (FALSE) publishing of the xUnit Xml report *)
xUnitEnablePublish : BOOL := FALSE;
(* Default reserved PLC memory buffer used for composition of the xUnit xml file (64 kb default) *)
xUnitBufferSize : UDINT := 65535;
(* Default path and filename for the xunit testresults e.g.: for use with jenkins
Use environment variables for a OS independent file path
- %TC_BOOTPRJPATH% -> 'C:\TwinCAT\3.1\Boot\' (Windows), '/usr/local/etc/TwinCAT/3.1/Boot/' (TC/BSD), '\Hard Disk\TwinCAT\3.1\Boot\' (Windows CE)
- %TC_INSTALLPATH% -> 'C:\TwinCAT\3.1\' (Windows), '/usr/local/etc/TwinCAT/3.1/' (TC/BSD), '\Hard Disk\TwinCAT\3.1\' (Windows CE) *)
xUnitFilePath : T_MaxString := '%TC_BOOTPRJPATH%tcunit_xunit_testresults.xml';
(* This is the maximum number of ADS-messages that can be stored for reporting at the same time.
Having a size of 2000 means that it's possible to report up to ~400 test cases in one single
PLC cycle. Each entry consumes around 500 bytes, so with an example of a ring buffer size of
2000 it means that TcUnit will consume around 1 MB of router memory. *)
AdsLogMessageFifoRingBufferSize : UINT := 2000;
(* Time delay between a test suite is finished and the execution of the next test suite starts
if using RUN_IN_SEQUENCE() *)
TimeBetweenTestSuitesExecution : TIME := T#0MS;
END_VAR