Editor: Test scripts
Function: The test script editor provides the implementation of the test run. The top node is always the Test scripts test element. At least one Test case test element is below that. The button bar above the test script tree provides options for editing and executing the test script.
Call: In the Test Manager view, on the Test scripts tab, select a test script.
![]() | Saves changes, which you have made in the test script editor or in the test element editor, to the test repository |
| Sets a pin at the current contents of the test script ( As soon as a change is made to the script, the pin is automatically removed The test report contains the information as to whether or not a pin is set for all scripts and the called subscripts. The pin is stored in the test repository as part of the test script and is retained during export or import. |
![]() | Saves changes in the test repository, you have made in the test script editor or test element editor, and then starts the test run To do this, the Execute Test dialog opens first. There you can specify a tester name. The test run is started when you click Start to exit the dialog. |
![]() | Saves changes in the test repository, which you have made in the test script editor or test element editor, and then starts the test run in debug mode For this, the Test progress opens in debug mode and with the status |
![]() | Expands and collapses an additional node in the tree each time the button is clicked |
![]() | Expands all nodes with a set breakpoint |
Input field | Offline mode: The test script is scanned for the string given here. The detected locations are marked in the test script tree. |
Test script tree
Implementation of the test run with test elements
For this, use the commands in the Test Manager menu.
Commands are also provided in the context menu to comment out test elements in order to exclude them from a debug test run, as well as to set breakpoints.
The top node always contains the Test script test element.
: Test action
: Assignment
: Call
: Choose
: IEC unit test
: Remote call
: Test case
Example:
Double-click the Examples.CounterTest
test script in the default test repository to open the following test script in the editor.

Tip
A test script is displayed hierarchically in a folder structure in the Test Manager view. This corresponds to storage in the test repository. As a result, you need to specify its path when accessing the test script. The path contains the hierarchical folders, each separated by a period, and then the test script name.
Tip
Changes in the test script editor are stored for the following actions:
Button
: Save the test script.
Button
: Save the test script and start the test run.
Button
: Save the test script and start debugging the test script.
The CODESYS project.
menu command saves the openTip
Note that is it possible to pin a test script to monitor the script for unwanted changes. The script retains the pin until it semantically gets the next change. The information about whether or not a pin is set is also included in the test report, and is retained during the export or import of scripts.