Editor: Test script editor
Function: In the test script editor, you implement the test run of a test script with test elements. The editor shows the test script as a tree. The top node is always the Test Script test element, followed by at least one test case.
Call: Double-click a test script in the Test Manager view, Test Scripts tab
The editor consists of the following areas:
Toolbar with buttons and search field
Test script tree with the test elements
Description field below the test script tree: Comment for the selected test element. The field is active only if the test element can have a comment.
Test element configurator next to the test script tree: Tabs with the settings of the selected test element
| Saves the test script in the test repository |
| Sets or removes the pin and saves the test script The test report contains the information as to whether or not a pin is set for all scripts and the called subscripts.
The set pin indicates that the script has not been changed. The pin is stored in the test repository as part of the test script and is retained during export or import.
As soon as a change is made to the script, the pin is automatically removed. |
| Saves the test script and executes it like the Execute Script command. |
| Saves the test script and executes it in debug mode like the Debug Script command. Saves changes in the test repository that you have made in the test script editor or test element editor, and then starts the test run in debug mode This opens the Test Progress dialog in debug mode with the status Halted. The Halt on Error setting is enabled. |
![]() | Each click switches to the next display:
|
![]() | Expands all nodes with a set breakpoint and selects them |
Search field | Enter a search term and press the Enter key. All test elements whose name or comment contains the search term are expanded and selected. There is no case sensitivity. |
Display detail columns | Shows or hides a second column in the test script tree. The button shows a list box with the following options:
When you close the test script editor, the None option applies again. |
For more information, see the following: Tab: Test Scripts, Execute Script, Debug Script, Test Progress, Commands on the Test Scripts tab, and Test Elements
Test script tree
Implementation of the test run with test elements
You build the test run in the test script tree. The commands for this are located in the context menu of a test element:
Insert or add test elements: Test Case, Action, Assignment, Call, Remote Call, Choose, Branch
Insert …: Inserts the test element above the selected test element.
Add …: Adds the test element at the end of the selected test element.
Comment out / uncomment: Excludes a test element from execution
Toggle Breakpoint and Switch Breakpoint Activation: Breakpoints for debug mode
The top node always contains the Test Script test element.
: Test case
: Test action
: Assignment
: Call
: Choose
: Remote call
: IEC unit test
When you select a test element, the test element configurator shows its settings on tabs. You edit the comment in the description field below the test script tree.
Saving
The following toolbar icons save the test script in the test repository:
,
,
, and
. This overwrites the open version.
If you have changed the name or version of the test script, then a prompt is displayed when you save:
Rename the test script | Saves the test script under the new name or the new version. The original test script is deleted. |
Copy the test script | Saves the test script under the new name or the new version. The original test script is retained. |
Don't save the changes. | Cancels the save operation |
To create a new version of a test script, change the version and select Copy the test script.
If you close the editor with unsaved changes, then you can save the changes, keep the editor open, or close the editor without saving.
Important
You cannot save test scripts without a valid license for the CODESYS Test Manager.
Tip
The File → Save Project menu command saves the open CODESYS project.


