SubType Property (Codeunit)
The content in this topic only applies to Microsoft Dynamics NAV 2009 SP1. For Microsoft Dynamics NAV 2009 content, see Developer and IT Pro Help for Microsoft Dynamics NAV 2009.
Sets the codeunit to functions as a normal, test, or test runner codeunit.
In Microsoft Dynamics NAV 2009 SP1, you can create test codeunits and test runner codeunits to test your application.
You write test functions as C/AL code in the test codeunits. When a test codeunit runs, it executes the OnRun function and then executes each test function in the codeunit, records the outcome in a log, and displays the results in a message window. The continuation of the test function run is dependent on successful run of the OnRun function. The difference between a normal codeunit and a test codeunit is their execution at run time. When a normal codeunit is run, if one of its functions fails, then the codeunit is terminated. When a test codeunit is run, if a function fails, then the function is terminated, but the codeunit continues to run the remaining functions.
A test runner codeunit runs the test codeunits that are programmed to run from its OnRun trigger. When a test runner codeunit runs, it does the following:
Calls thebefore each test codeunit, and the OnRun function and test function is executed.
Calls theafter each test code unit, and the OnRun function and test function is executed.
Indicates that a test function has failed if it invokes the user interface.
For more information, see.