/
Test Worksheet

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

24_test-worksheet-1.png

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

  • Only manual – The test will only be executed manually in the test worksheet.

  • Before transport The test will be executed before it is transported. This option is only available if the test is added to a project

  • Before every transport The test is executed every time a transport is done.

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.

25_example.png

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.

26_parameters.png

The result of this test will be Test succeeded.

27_test-succeeded.png

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’

28_test-failed.png

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.”.

29_performance-test.png

 

Related content

IDYN 2024