A lightweight unit test library for testing TwinCAT3 source code with the following goals:
- Impose minimum setup cost for a new test
- Provide a Gui to show test results
- Support re-testing after an online change
- Support concurrent and sequential test execution
To create a test:
- Inherit from a base class
- Create an instance
- Call TestFinished()
To run all the tests together, call:
tcl_SimpleUnitTestLibrary.TestFramework.TestRunner(RunTestsSequentially := FALSE);
To run all the tests one after another, call:
tcl_SimpleUnitTestLibrary.TestFramework.TestRunner(RunTestsSequentially := TRUE);
To stop tests from running automatically on download or (re)init, call:
tcl_SimpleUnitTestLibrary.TestFramework.TestRunner(ManualTestRunsOnly := TRUE);
Options can be combined in any way. I.e. call:
// Run tests concurrently, but only with press of Visualisation button
tcl_SimpleUnitTestLibrary.TestFramework.TestRunner(
RunTestsSequentially := FALSE,
ManualTestRunsOnly := TRUE
);