Uploaded by thiyagu raj

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

advertisement
Creating a Project in vTESTstudio
2019-05-07
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
Author(s)
Restrictions
Marco Brantsch
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 .......................................................................................................................4
Create a Test Table.....................................................................................................................5
Create a Test Case .....................................................................................................................6
Build a Test Unit ..........................................................................................................................9
Configure a Test Unit in CANoe................................................................................................. 10
Contacts.................................................................................................................................... 12
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.
3.
Select a folder, enter a filename and click [Save].
The new project will be created.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
2
Creating a Project in vTESTstudio
3
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:
https://kb.vector.com/upload_551/file/Creating_a_Project_in_vTESTstudio_898.zip
1.
2.
3.
4.
Start CANoe configuration in which you want to use the test units from your
vTESTstudio project.
Open under Home|Configuration.
Select System Environment tab.
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
3
Creating a Project in vTESTstudio
5.
Select Build tab.
Choose 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.
4 Create a Test Unit
1.
2.
3.
Open Project View.
Click the created project e.g. vTESTstudio_Project.
Select New Test Unit from the context menu of the created project.
In the Project View window appears a subfolder.
4.
Type in a test unit name and [Enter].
The new test unit is created now.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
4
Creating a Project in vTESTstudio
5 Create a Test Table
1.
2.
3.
Open Project View.
Click on the created test unit e.g. TestUnit_Example.
Select Add|Test Table from the context menu of the created project.
In the Project View appears a subfolder.
4.
Type in a test table name and [Enter].
The new test table is created now. A test table tab opens automatically.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
5
Creating a Project in vTESTstudio
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.
Select Test Case. and [Enter]
5.
Test Case apears in the Test Tree.
Select case name (e.g. TestCase_Example) and other general test case
settings according to the requirements.
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 200ms.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
6
Creating a Project in vTESTstudio
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
7
Creating a Project in vTESTstudio
To see all available commands, go to menu Test Table|Test Commands.
SN-IND-1-027_Creating_a_Project_in_vTESTstudio.pdf
8
Creating a Project in vTESTstudio
7
Build a Test Unit
Test Units have to be compiled, before they can be used in CANoe.
1. 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
9
Creating a Project in vTESTstudio
8 Configure a Test Unit in CANoe
1.
2.
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
10
Creating a Project in vTESTstudio
4. Select 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
11
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
9
Contacts
Support
required?
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
12
Download