Saturday, 1 August 2015

Adding a Test to a Test Runner Codeunit

How to add a line to test runner codeunit that runs the new TestVendorDiscount codeunit.

The test runner codeunit runs all the test codeunits that you may have created to test the other customized functionality.

To add a test to a test runner codeunit

  • In the development environment, on the Tools menu, choose Object Designer.

  • In Object Designer, choose Codeunit, select the existing test runner codeunit, and then choose the Design button.

  • In the C/AL Editor, in the OnRun function, add the following code.


CODEUNIT.RUN(CODEUNIT::TestVendorDiscount);


  • On the File menu, choose Save.


For more details see below posts:

Creating a Test Codeunit and Test Function
Creating a Test Runner Codeunit

3 comments:

  1. […] Creating a Test Runner Codeunit Adding a Test to a Test Runner Codeunit […]

    ReplyDelete
  2. […] Creating a Test Codeunit and Test Function Adding a Test to a Test Runner Codeunit […]

    ReplyDelete
  3. […] Creating a Test Codeunit and Test Function Creating a Test Runner Codeunit Adding a Test to a Test Runner Codeunit […]

    ReplyDelete