How to create tests?ΒΆ
To create a test in ecu.test a package has to be created. Next to the Test case tab a package contains further Work window like recordings, trace analysis, the last report and properties.
A test case is a list of test steps. The steps of a test case are mostly connected among each other. Thus various data can be exchanged between test steps via variables.
A test step is a simple operation in which mostly just one instruction is carried out. A test step can be, for example, reading or writing a value in an engine control device or carrying out calculations or comparisons. All test steps are described in chapter Action window.
Independent of the currently loaded configuration there are standard test steps with a short description that are always available as test steps. Those test steps can be inserted into the test case editor via drag and drop. A dialog to configure the test step will be opened and after confirming the dialog the test step can be found in the test case editor. Frequently used test steps can also be found in the Button bar packages of the package editor, for example If-Then-Else (conditioned branching), Loop and Wait from the Flow control, from section Structuring the Block (to summarize test steps) and the comment and from Data operations the Calculation.
Info
If the test environment has to be prepared and reset, the usage of precondition and postcondition is recommended. If an error occurs while preparing the test host in the precondition, the test case itself will not be executed. The postcondition is always executed to reset the test environment.
The actions tab Generic test steps is as well available independent of the current configuration. The resulting generic test steps can be created without tools. Especially such test steps for which it is not clear where to map on creation time, can be created here. A generic test step has to be linked to a concrete mapping before execution - either by a Local mapping, a Global mapping or a Parameterized Mapping - otherwise it will be evaluated as ERROR.
To modularize test cases, other packages can be referenced in the test case. Packages can have parameters and return values to link the results of the different package references. If configurations, or rather Configuration change, are needed a project can be created. Potential Project elements are for example package references, project references, change configuration steps and folders. Settings can be done on the project node, folders and in the form of parameter sets at packages to parameterize and structure the project elements.
A package or project can be executed by clicking the play button or pressing the key F9. In the package editor the execution dialog is automatically closed and the tab Test report is shown, that contains the clearly arranged report of the last package execution. All test reports can be found in the workspace in sub folder TestReports, as long as no other report directory was configured. In the test case traces can be recorded that can be evaluated by the trace analysis.