You can find the Test Worksheet in menu Analyzing Tools or access it from the project- or transport card. If you add a test to a project it will be transported to your customer database and it can be tested before you do the transport.
A test has the following options:
|Codeunit No.||The codeunit that will execute the test.|
|Codeunit Name||The name of the codeunit.|
|No. of Input Parameters||The number of input parameters that is used in the test codeunit.|
|No. of Output Parameters||The number of output parameters that is used in the test codeunit. If one of the output parameters has another value the test will fail.|
|Maximum Duration (ms)||If the duration of the test is longer than this value the test will fail.|
|Last Test Succeeded||The result of the last executed test.|
|Last Test Result||The result of the last executed test. If an error has occurred the error message is shown in this field.|
Example of a Test CodeunitCodeunit 11102078 - OM - Test Example is a simplified example of how a test codeunit could look like.
This codeunit will test if in a new project the user that is validated in the first user role will be the active user. In this example you see that it has 1 input parameter and 1 output parameter.
The result of this test will be Test succeeded.
If you have done a modification to the project module which will result in another active user the test will fail and give you the result “Parameter 'ActiveUser' returned 'KOOS SPLINTER'. Must be 'REIJER MOLENAAR'
If you lower the maximum duration to 5 ms. the test will also fail and the result will be “Duration of test was 27 ms.”.