Lesson 1: First startup and first test case

In this lesson, you learn the basic workflow in ecu.test: workspace creation, create a package, run test case, and evaluate the result in the Report Viewer.

At the end of this exercise, your first own test case runs in ecu.test, and you know where to view the test result.

The goal is not yet to understand every term and interaction concept in detail, but to get a feeling for how working with ecu.test is structured into clear steps.

Create a workspace and copy sample data

When you start ecu.test for the first time, a workspace is created. The workspace is the base directory for all files used by ecu.test.

For this lesson, it is sufficient to keep the suggested workspace path in the Select workspace field.

../../_images/Tutorial_Lesson_1_Workspace.png

Additional data is required for the examples in this lesson.

  1. Enable the checkbox Show workspace settings.

  2. Enable the checkbox Copy tutorial data.

  3. Select Tutorial in the drop-down menu.

  4. Confirm with OK.

ecu.test starts and automatically creates the workspace directory structure. The sample data is then available.

Find your way around the user interface

After startup, the ecu.test user interface is shown. For getting started, only three areas are relevant:

  • Action Window

  • Editor

  • Configurations

../../_images/Tutorial_Lesson_1_UI_Overview.png

A complete overview of all windows is not necessary at this point. For now, it is enough to recognize these three areas and understand their role in the workflow.

Create the first package

To create a test case, you need a Package in ecu.test. A package is the container for all test steps of a test case.

  1. Create a new package: File ‣ New ‣ Package ‣ Empty Package.

An empty package opens in the Editor. This package is already executable, but it does not contain any test steps yet.

Add the first test step

In the next step, you add a simple test step. It checks whether the expression 5 + 5 returns the expected value 10.

For this purpose, use the Calculation test step.

../../_images/Tutorial_Lesson_1_Add_Calculation_Step.png
  1. Insert a Calculation test step using the package toolbar.

    ../../_images/Tutorial_Lesson_1_Calculation_Expression.png
  2. Enter the following Python expression in Expression: 5 + 5.

    To evaluate the result, you also need to define an expectation.

  3. Enable the Evaluation option.

  4. Enter == 10 as the expectation in Measurement.

  5. Confirm with OK.

The test step is now fully configured.

Execute the test

When you execute the package, ecu.test starts the test case and then generates a report with the test results.

  1. In the package Editor, click Run test case or press F9.

    ../../_images/Tutorial_Lesson_1_Run_Testcase.png

The test case is executed. The result is shown in the Test report tab.

Evaluate the test result in the report

The Test report provides a direct link to the test steps so that you can quickly see which step succeeded and where an error occurred. The report also provides a summary of the entire test run.

  1. In the report, verify that the calculation test step has status SUCCESS.

    The status SUCCESS shows that the expectation is fulfilled.

    ../../_images/Tutorial_Lesson_1_Report_Success.png
  2. In the report navigation, click the top node to show the test run summary.

    The overview shows the summary of the test result.

    ../../_images/Tutorial_Lesson_1_Report_Summary.png

Save the package

You can save the created package and open it again later.

  1. Save the package using one of the following options:

    • File ‣ Save in the menu or

    • the Save package button or

    • the keyboard shortcut Ctrl+S

    savePackageMenu savePackageButton

    The file explorer opens in the Packages folder of the configured workspace directory.

  2. Enter a name (for example FirstTestCase).

  3. Confirm with Save.

The package appears in the ecu.test workspace explorer under Packages and can be opened and edited again from there.

Result of lesson 1

In this lesson, you started ecu.test with a sample workspace, created a package, defined a simple test step, executed the test case, and evaluated the result in the test report.

The example is intentionally simple. It does not yet access test quantities of an SUT (System under Test) or model.

Outlook:

In the next lessons, you create a more realistic test case with read and write access to test quantities based on configurations.

Continue with Lesson 2.