SubType Property (Codeunit)
TOC
Collapse the table of content
Expand the table of content

SubType Property (Codeunit)

NoteNote

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.

Codeunits

NoteNote

The SubType property is only visible if the Show C/AL Testability properties option of the Classic client is set to Yes. To change this setting, on the Tools menu, click Options.

Value Description

Normal

A normal codeunit. This is the default setting.

Test

A test code includes C/AL functions that test the application. For more information, see How to: Create Test Codeunits and Test Functions.

TestRunner

A test runner codeunit manages the execution of one or more test codeunits. For more information, see How to: Create a 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 the OnBeforeTestRun Trigger before each test codeunit, and the OnRun function and test function is executed.

  • Calls the OnAfterTestRun Trigger after 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 Testing the Application.

Community Additions

ADD
Show:
© 2016 Microsoft