Skip to main content

Documenting the test result in reports

The Test Manager creates a test report for each test run. The test report contains the result of the test run and the result of each test case and each test action. By means of the actions of the TestManager.Testreport test driver, you add more information to the test report, for example the versions of the testee or files. It also contains information about the test run, for example the date, the test script with its version, and the name of the tester. You save the test report as an HTML file.

Adding more information to the test report

Requirement: The test script is saved in a test repository. The test project is prepared.

This step is optional. Without actions of the TestManager.Testreport test driver, the test report contains the results and information about the test run.

  1. In the Test Manager view, on the Test Scripts tab, double-click the test script.

    The test script editor will open.

  2. In the test script tree, right-click a test case or a test action and select Add Action or Insert Action.

    A new test action is inserted.

  3. In the test element editor, specify a title in Title, and in Action, select an action of the TestManager.Testreport test driver. See Testreport.

  4. Configure the action on the Configuration tab.

  5. In the toolbar of the test script editor, click Save.

    The test script is saved. The information is added to the test report during the next test run.

Table 1. Additional information for the test report

Action

Adds to the test report

AddVersionInformation

Any component name with a version, for example the version of the testee

AddEngineeringToolInformation

The profile of CODESYS, the operating system, and .NET Framework; optionally the plug-ins and the installed packages

AddDeviceVersionInformation

The version of a device in the test project and its subdevices; optionally the other installed versions

AddLibraryVersionInformation

The libraries of a library manager in the test project with their versions

AddRuntimeVersionInformation

The runtime system modules of the controller

AddResultInformation

A text with a severity (information, warning, or error) for the current test action, the current test case, the test script, or the test run

AddFile

A file from the file system, for example a log or a screenshot



Important

The test report is not saved automatically after the test run. If you close a test report which has not been saved yet, then a prompt to save it is displayed. Click Yes to save it.

Tip

The HTML file gets the name of the test script without the folder, for example Counter_ApplicationTest.html. An existing file with the same name in the target directory is overwritten. If you want to keep the test reports of multiple test runs, then you can save the test reports in different directories.

Tip

If you execute test scripts via the command line, then the test report is saved automatically in the directory which you specify with the --testreportfolder option. The Copy Command Line to Clipboard command gives you the appropriate command line.

For more information, see the following: Running the test script and saving the test report, Copy Command Line to Clipboard, Testreport