Object Manager
Test Worksheet
The Test Framework is used to automate tests. If you have a certain process that has to be tested before you transport objects to your customer database you can write a codeunit with input and output parameters that will be tested before the transport is executed.
Create Test
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.
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. |
Run Frequency |
|
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 Codeunit
Codeunit 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.”.
Related content
IDYN 2024