Skip to main content

Management in the Test Repository

Test scripts are managed in test repositories which also include the reports. The hierarchical structure of a test repository is similar to a folder.

The default test repository which is initially created is located on the local disk in C:\Users\<User>\AppData\Local\CODESYS Test Manager\Test Repository, and contains the ApplicationTest, CounterTest, CounterTestTable, and IecUnitTest sample scripts.

Tip

The sample scripts are created for a CODESYS Control Win controller (32 bit). If you use a different controller, then you need to adapt the parameters of the UpdateDevice script action.

Creating a test repository

  1. In the Test Repository list box, select Edit Test Repository.

    The Edit Repository Locations dialog opens.

  2. Click Add.

    The Add Test Repository dialog opens.

  3. Click Create.

    The Find Folder dialog opens.

  4. Create or select an empty folder for the new test repository (example: D:\Test Manager\TestRepository_1).

  5. Specify a name for the test repository (example: Repository_1) and exit the dialog.

    The new repository is listed in the Edit Repository Locations dialog. Exit this dialog.

  6. In the Test Repositories list box, select the recently created Repository_1.

    The lists in the Test Scripts and Reports tabs are blank.

Creating a test script

  1. On the Test Scripts tab, select the top entry in the list.

  2. Click Test Manager → Create Test Script.

    The list contains the new test script as the name Unnamed_1(0.0).

  3. Click the test script.

    The blank script Unnamed_1(0.0) is opened in the test script editor.

  4. On the Test Script tab, change the name to First_Script.

  5. Click the Save button.

    An input prompt opens.

  6. Select the Rename the test script option and click OK.

    The changes are saved. The script is renamed in the test script editor and in the test repository.

    Note: Saving the test script is independent of saving any open projects. You can save a test script only by clicking the Save button in the test script editor.

Running the test script and saving the test report

Procedure. Starting the test script in the test script editor and saving the report in HTML format on the development system
  1. In the Test Manager view, on the Test scripts tab, click a test script.

    The test script editor opens.

  2. Click the Save + Run button.

    The Execute Test dialog opens.

  3. In the Execute Test dialog, specify the name of the tester and click Start.

    The test script is executed. The results are displayed as a report in the editor.

  4. On the lower right side of the editor, click the Save as HTML button.

    Alternatively, you could also select the Reports tab in the Test Manager view. There the report is saved in the Not saved folder as First_Script (dd.mm.yyyy, hh:mm). Select the report and click Save as HTML in the context menu (Test Manager → Save as HTML).

    The Find Folder dialog opens.

  5. Select a location for the test report and click OK.

    The test report is saved in HTML format.

Procedure. Starting a test script in the Test Manager view and saving the report in the repository
  1. In the Test Manager view, on the Test scripts tab, select a test script.

  2. In the context menu, click _tm_icon_start.pngTest Manager → Execute Script.

    The Execute Test dialog opens.

  3. In the Execute Test dialog, specify the name of the tester and click Start.

    The test script is executed. The results are displayed as a report in the editor.

  4. In the Test Manager view, select the Reports tab.

    There the report is saved in the Not saved folder as First_Script (dd.mm.yyyy, hh:mm).

  5. Select the report and click Test Manager → Save Test Report.

    The test report is saved in the test repository. The report is displayed one level higher on the tab and no longer in the Not saved folder.