Thursday, June 4, 2026

Creating a Project in vTESTstudio - Step by Step

 


Contents

1    Overview
2    Create a Project
3    Configure the Project Environment
4    Create a Test Unit
5    Create a Test Table
6    Create a Test Case
7    Build a Test Unit
8    Configure a Test Unit in CANoe


1    Overview

This article describes how to create a test unit with vTESTstudio and how to integrate it into CANoe. It shows all necessary steps from creating a vTESTstudio project to carrying it out in CANoe and it will be the best entry into vTESTstudio area for beginners. The final example project can be downloaded from here: Creating_a_Project_in_vTESTstudio.zip


2    Create a Project

  1. Open vTESTstudio.
  2. Click New Project in the File menu. The New Project dialog appears.
    Screenshot 1
  3. Select a folder, enter a name and click Save. The new project will be created.
    Screenshot 2

3    Configure the Project Environment

The System Environment defines the environment in which the test units will be later executed. This environment must either correspond directly with the System Environment of the CANoe configuration or at least to those parts used in the test. Referenced files are not added automatically to the CANoe configuration when configuring a test unit in CANoe. The System Environment can be created automatically from an existing CANoe configuration while CANoe is running. Click the Import button to import the System Environment from an open CANoe instance.

This example uses the CANoe configuration vTESTstudioProject.cfg which is contained in the ZIP archive Creating_a_Project_in_vTESTstudio.zip.

  1. Start the CANoe configuration in which you want to use the test units from your vTESTstudio project.
  2. Open in vTESTstudio the project configuration under Home | Configuration.
    Screenshot 3

  3. Select the System Environment tab.
  4. Click Import to be able to import the CANoe environment. It contains references to Databases, System Variables and Diagnostics description files.
    Screenshot 4

  5. Select the Build tab. Choose with ... the output path in which the test units shall be created.
    Screenshot 5

  6. There are 4 methods to publish the System Environment:
    • Click Apply & Close
    • or click File | Save Project File
    • or click Publish Symbols of All Files (in Ribbon under Build)
    • or press <F5>

The System Environment is now active.

Note: It is alternatively possible to...

  • ...use the configuration from a venvironment.yaml file (see step 4). This alternative is often convenient when working with CANoe Server Editions, 
  • ... load the references to Databases, System Variables and Diagnostics description files manually by clicking Add / Add Network (see step 4) without opening the CANoe configuration.

4    Create a Test Unit

  1. Open the Project View (Layout | Views | Project View) if not already open.
  2. Right-click on the created project e.g. vTESTstudio_Project.
  3. Select New Test Unit from the context menu of the created project.
    Screenshot 6

    In the Project View window a subfolder appears.
    Screenshot 7

  4. Type in a test unit name and press <Enter>.

The new test unit is created then.


5    Create a Test Table

  1. Open the Project View.
  2. Right-click on the created test unit e.g. TestUnit1.
  3. Select Add | Test Table from the context menu of the created project.
    Screenshot 8

    In the Project View a subfolder appears.
    Screenshot 9

  4. Type in a Test Table name and <Enter>.

The new Test Table is created now. A Test Table tab opens automatically.


6    Create a Test Case

  1. Make sure that the Test Table is still open.
  2. Select the new Test Table tab e.g. TestTable_Example.vtt.
  3. Click on Command… and type test. The autocomplete input assistance opens.
    Screenshot 10

  4. Select Test Case and press <Enter>. The Test Case appears in the Test Tree.
  5. Select Test Case name (e.g. TestCase1) and other general Test Case settings according to your requirements.
    Screenshot 11

The implementation of the Test Case follows in the next steps.

Test scenario: When the signal Velocity has a value of 100, the signal LockState has to have a value of 1. The test should set the signal Velocity to the value of 100 and check that the signal LockState is set to a value of 1 within 200 ms.

Test implementation: In this example the State Change command is used to implement this scenario. This command contains a SetWaitCheck sequence.

  1. Make sure that the Test Table is still open.
  2. Select the new Test Table tab e.g. TestTable_Example.vtt.
  3. Click on Command… and type state. The autocomplete function of vTESTstudio opens a context menu.
  4. Double click State Change.
    Screenshot 12

  5. Click on State Change.
  6. In the Set line click Symbol… and type velocity.
    Screenshot 13

    The autocomplete function of vTESTstudio opens a context menu and shows suitable signals of the database (the available signals depend on the database imported under chapter 3. Configuration).
  7. Select Velocity.
  8. In the Set line, enter a value of 100.
  9. In the Wait line, enter a value higher than 100, e.g. 200 because the cycle time of this message is 100 ms in the database.
  10. In the Check line click Symbol… and type LockState. The autocomplete function of vTESTstudio opens a context menu and shows suitable signals of the database.
  11. Select LockState
  12. In the Check line, enter a value of 1

To see all available commands, go to menu Test Table | Test Commands. Please note that the Test Commands window might be docked at any side of the screen or floating outside of vTESTstudio.

Screenshot 14


7    Build a Test Unit

Test units have to be compiled, before they can be used in CANoe.

In vTESTstudio select Home | Build All Test Units from the context menu or press <F6>.

Screenshot 15

An executable test unit with file format VTUEXE is now generated in the folder which was defined in Project | Configuration… | Build (see Chapter 3, step 5).

Screenshot 16

The Output window shows the results of the built test unit. Errors or warnings are displayed here if the build was not successful.

Screenshot 17


8    Configure a Test Unit in CANoe

  1. Open the CANoe configuration from which the System Environment was imported to vTESTstudio.
  2. Select Test | Test Setup | Test Configurations. A new window Test Configurations for test units opens now.
  3. Click Add Test Configuration icon.
    Screenshot 18

    Enter a descriptive name. Confirm with <Enter>.
    Screenshot 19

    A new Test Configuration dialog opens.
  4. Select the Add Test Unit icon in the test configuration window.
    Screenshot 20

    A new window opens
    Screenshot 21

  5. Select the executable test unit according to the output path of the vTESTstudio (see Chapter 3, step 5).
  6. Start the CANoe measurement (with <F9>). Click the Start icon to start the test. The test is executed.
    Screenshot 22

  7. When the test execution is finished, click the Open Test Report icon to view the resulting test report.
    Screenshot 23

    Screenshot 24, Test Report

 

 

No comments:

Post a Comment

Creating a Project in vTESTstudio - Step by Step

  Contents 1    Overview 2    Create a Project 3    Configure the Project Environment 4    Create a Test Unit 5    Create a Test Table 6    ...