Uploaded by Aditya Adi

SN-IND-1-027 Creating a Project in vTESTstudio

advertisement
Creating a Project in vTESTstudio
2021-12-17
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
Author(s)
Restrictions
Marco Brantsch
Public document
Table of contents
1
2
3
4
5
6
7
8
9
Overview .....................................................................................................................................1
Create a Project ..........................................................................................................................2
Configure the Project Environment ..............................................................................................3
Create a Test Unit .......................................................................................................................6
Create a Test Table .....................................................................................................................6
Create a Test Case .....................................................................................................................7
Build a Test Unit ........................................................................................................................10
Configure a Test Unit in CANoe .................................................................................................11
Contacts....................................................................................................................................14
1
Overview
This Support Note describes how to create a Test Unit with vTESTstudio and how to configure it into
a CANoe configuration.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
1
Creating a Project in vTESTstudio
2
Create a Project
1.
2.
Open vTESTstudio.
Click New Project in the File menu.
The New Project dialog appears.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
2
Creating a Project in vTESTstudio
3.
3
Select a folder, enter a file name and click <Save>.
The new project will be created.
Configure the Project Environment
Overview
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 available from the Vector KnowledgeBase article
KB0011763: Creating a Project in vTESTstudio – Step By Step.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
3
Creating a Project in vTESTstudio
1.
2.
Start the CANoe configuration in which you want to use the Test Units from
your vTESTstudio project.
Open the project configuration under Home | Configuration.
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.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
4
Creating a Project in vTESTstudio
5.
Select the Build tab. Choose the output path in which the Test Units shall be
created.
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 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.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
5
Creating a Project in vTESTstudio
4 Create a Test Unit
1.
2.
3.
Open the Project View (Layout | Views | Project View) if not already open.
Right-click on the created project e.g. vTESTstudio_Project.
Select New Test Unit from the context menu of the created project.
In the Project View window a subfolder appears.
4.
Type in a Test Unit name and press <Enter>.
The new Test Unit is created now.
5 Create a Test Table
1.
2.
3.
Open the Project View.
Right-click on the created Test Unit e.g. TestUnit_Example.
Select Add | Test Table from the context menu of the created project.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
6
Creating a Project in vTESTstudio
In the Project View a subfolder appears.
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.
2.
3.
Make sure that the Test Table is still open.
Select the new Test Table tab e.g. TestTable_Example.vtt.
Click on Command… and type test.
The autocomplete input assistance opens.
4.
5.
Select Test Case and press <Enter> . The Test Case appears in the Test Tree.
Select Test Case name (e.g. TestCase_Example) and other general Test
Case settings according to your requirements.
The implementation of the Test Case follows in the next steps.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
7
Creating a Project in vTESTstudio
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 Set – Wait – Check sequence.
1.
2.
3.
4.
Make sure that the Test Table is still open.
Select the new Test Table tab e.g. TestTable_Example.vtt.
Click on Command… and type state.
The autocomplete function of vTESTstudio opens a context menu.
Double click State Change.
5.
6.
Mark State Change.
In the Set line click Symbol… and type velocity.
7.
8.
9.
10.
11.
12.
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).
Select Velocity.
In the Set line, enter a value of 100.
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.
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.
Select LockState
In the Check line, enter a value of 1
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
8
Creating a Project in vTESTstudio
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.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
9
Creating a Project in vTESTstudio
7
Build a Test Unit
Test Units have to be compiled, before they can be used in CANoe.
In the vTESTstudio select Home | Build All Test Units from the context menu or
<F6>.
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 6).
The Output window shows the results of the built Test Unit. Errors or warnings are
displayed here if the build was not successful.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
10
Creating a Project in vTESTstudio
8 Configure a Test Unit in CANoe
1.
2.
3.
Open the CANoe configuration from which the system environment was
imported to vTESTstudio.
Select Test | Test Setup | Test Configurations.
A new window Test Configurations for Test Units opens now.
Click Add Test Configuration icon.
Enter a descriptive name. Confirm with <Enter>.
A new Test Configuration dialog opens.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
11
Creating a Project in vTESTstudio
4. Select the Add Test Unit icon in the test configuration window.
A new window opens.
5.
Select the executable test unit according to the output path of the
vTESTstudio (see Chapter 7, step 2).
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
12
Creating a Project in vTESTstudio
6.
Start the CANoe measurement [F9].
Click Start Icon to start the test. The test is executed.
7.
When the test execution is finished, click the Open Test Report Icon to view
the resulting test report.
Test Report
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
13
Creating a Project in vTESTstudio
9
Contacts
Please find the contacts of Vector Informatik GmbH and all subsidiaries worldwide via:
https://www.vector.com/int/en/company/contacts/
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
14
Download