VTESTstudio ConceptManual en
VTESTstudio ConceptManual en
The information and data given in this user manual can be changed without prior notice. No part of this manual may be reproduced in
any form or by any means without the written permission of the publisher, regardless of which method or which instruments, electronic
or mechanical, are used. All technical information, drafts, etc. are liable to law of copyright protection.
Copyright 2016, Vector Informatik GmbH. Printed in Germany.
All rights reserved.
Concept Manual vTESTstudio Table of Contents
Table of Contents
1 Introduction 3
1.1 About this User Manual 4
1.1.1 Access Helps and Conventions 4
1.1.2 Certification 5
1.1.3 Warranty 5
1.1.4 Support 5
1.1.5 Registered Trademarks 6
2 Overview 7
2.1 General 8
2.2 vTESTstudio and CANoe 10
2.3 Function Overview 10
2.4 Structure of a Project 11
2.4.1 Project Tree 11
2.4.2 File-Based Storage 11
2.4.3 Re-Use of Files 12
2.4.4 Home Directory and Libraries 12
2.4.5 Storage Location of Files on the File System 13
2.4.6 Structuring Using (Shareable) Folders 13
2.5 Concepts for High Test Coverage 13
2.6 REQM/TDM Connection (Traceability) 17
2.7 Test Design Documentation 19
5 Language Interaction 31
5.1 Interface Functions 32
7 Use Cases 41
7.1 Generating Two Similar Test Units for Different OEMs 42
1 Introduction
To find information The user manual provides you the following access helps:
quickly > at the beginning of each chapter you will find a summary of its contents,
> in the header you see the current chapter and section,
> in the footer you see to which program version the user manual replies,
> at the end of the user manual you will find an index.
Reference: Please refer to the online help for detailed information on all topics.
Conventions In the two following charts you will find the conventions used in the user manual
regarding utilized spellings and symbols.
Style Utilization
bold Blocks, surface elements, window- and dialog names of the
software. Accentuation of warnings and advices.
[OK] Push buttons in brackets
File|Save Notation for menus and menu entries
CANoe Legally protected proper names and side notes.
Source code File name and source code.
Hyperlink Hyperlinks and references.
<CTRL>+<S> Notation for shortcuts.
Symbol Utilization
Here you can obtain supplemental information.
Symbol Utilization
This symbol indicates an introduction into a specific topic.
1.1.2 Certification
1.1.3 Warranty
Restriction of We reserve the right to change the contents of the documentation and the software
warranty without notice. Vector Informatik GmbH assumes no liability for correct contents or
damages which are resulted from the usage of the user manual. We are grateful for
references to mistakes or for suggestions for improvement to be able to offer you
even more efficient products in the future.
1.1.4 Support
You need support? You can get through to our hotline at the phone number
+49 (711) 80670-200
or you send a problem report to the CANoe Support.
Registered All trademarks mentioned in this user manual and if necessary third party registered
trademarks are absolutely subject to the conditions of each valid label right and the rights of
particular registered proprietor. All trademarks, trade names or company names are
or can be trademarks or registered trademarks of their particular proprietors. All rights
which are not expressly allowed are reserved. If an explicit label of trademarks, which
are used in this user manual, fails, this should not mean that a name is free of third
party rights.
> Windows, Windows Vista, Windows 7 and Windows 8 are trademarks of the
Microsoft Corporation.
> vTESTstudio is a trademark of Vector Informatik GmbH.
2 Overview
2.1 General
Overview The vTESTstudio tool is a multifaceted and integrated work environment for
developing tests for embedded systems.
You can use different test design languages to write tests in vTESTstudio. The
following editors are supported:
Editors > CAPL Editor:
CAPL is the event-oriented programming language of CANoe that can also be
used for programming test sequences, test cases, and functions.
> C# Editor:
C# is a .NET programming language that CANoe expands with libraries
especially designed for testing and for accessing control units.
> Test Table Editor:
This editor enables writing of tests in tabular form and can be used without the
need for programming expertise.
> Test Diagram Editor:
Editor for modeling of test sequences in a graphic notation. This editor is
contained in the Graphical Test Design product option.
Re-use concept Through the use of libraries and a clear and easy to understand re-use concept,
whole files as well as individual test cases can easily be re-used in various tests.
Structured test For a structured test creation tests are supported that can contain several files.
creation
Parameterization Due to an integrated parameter concept, ECU configuration parameters and test
vectors can be administrated comfortable in separated files. From these files they can
be re-used in different tests.
Stimulation curves By the use of the Waveform Editor you can define curves to be used in the test as
stimulation curves for the system under test.
Variants A continuous variant support for test logic, test implementation and parameter values
allows an implementation of variant-independent tests.
User interface
Hand in hand The interaction with CANoe enables easy access to the system under test in all
languages. Database symbols, system variables, and diagnostic descriptions can be
easily used in all languages. The bus systems and protocols CAN, LIN, FlexRay,
Ethernet, WLAN and J1939 are supported.
Independent of their notation the tests are configured and loaded in CANoe, executed
in real time, and documented in a detailed test report.
Schema
Important features Among the things that vTESTstudio provides for a successful test environment are:
> Integration of graphic test design editors, programming editors, parameter editors
and curve editors in one tool.
> The clear modeling of the test logic in the Test Diagram Editor is well suited for
reviews.
> Easy re-use through possible separation of test logic, implementation, parameter
values, and test vectors.
> Possible pre-processing of events in CAPL and C# for access and evaluation in
test sequences.
> Integrated variant support for test structure, implementation, and Parameters.
> Concepts for High Test Coverage.
> Universal traceability of externally defined requirements and test descriptions in
the test implementation and in the test report.
> Automatically generated test design documentation for documentation purposes
as well as internal and external reviews.
Terms project and A vTESTstudio project consists of any number of test units. A test unit represents
test unit the configurable and executable unit in CANoe. It consists of a set of files that contain
the test implementation (CAPL files, C# files, test tables, test diagrams and parameter
files).
While a vTESTstudio project, for example, covers a control unit to be tested, a test
unit could have implemented the tests for a particular functionality of the control unit.
Examples Example 1
> Project for tests of the entire product line of an ECU
> Test units for tests of a variant of an ECU
Example 2
> Project for tests of the overall functionality of an ECU
> Test units for core features, error detection, diagnostics,
Storage of project All vTESTstudio project components are stored using file-based storing. A
components vTESTstudio project consists of a project file and any number of source code and
parameter files that are referenced in the project file.
Files relevant for the test (CAPL files, C# files, test table files, parameter files, etc.)
are created in the context of a test unit. Within a test unit, for example, test cases and
test functions can be accessed across file- and language boundaries. Similarly, the
parameters of a parameter file are known (only) in the context of the corresponding
test unit.
Linking of files Files can easily be re-used by linking them to other test units. This is done by moving
them from the source to the destination using a drag & drop operation. Thus, for
example, the same test sequence can be re-used in multiple test units, e.g. with only
using different parameter files for parameterizing the test sequence.
Home directory The directory where the project file is located is called the Home Directory. Files
from the root directory and files from specially defined Libraries can be used in the
project.
Libraries The Libraries view provides a filtered view of the file system. A library represents only
a folder on the file system that is made known in the project. Files from libraries can
also be linked to test units using a drag & drop operation.
If a library folder is moved on the file system, the library contents can only be
accessed again when the link to the library in vTESTstudio has been updated. The
paths of the linked files in the test units are then updated automatically.
Storage of files If a file is created in the context of a test unit, it is automatically created on the file
system under the path <Home Directory>\<Test Unit Name>.
If the files are to be organized differently on the file system, this can be done using
the Home Directory view. This view shows the file system located underneath the
project directory. If a file is moved in this view, possible links to this file in the test
units will be automatically updated.
Re-use of folders In order to structure the contents of test units more clearly, folders can be created
within a test unit (as many folders, including nested folders, as required). This has no
effect on the content of the test and is only used to group files.
In addition to re-use individual files, the re-use of whole folders is also possible. For
example, if a folder contains a test sequence description and an associated
parameter file, these two files can be re-used together by linking the whole folder to
another test unit.
If a folder with files is created underneath a test unit and then linked to another test
unit, the folder with the original files is located on the file system underneath the first
test unit. If such a "master test unit" is not desired, the folder can be created as a
shareable folder instead. This is done by the project's shortcut menu command New
Shareable Folder. Folders and files created by this are created on the file system
under the path <Home directory>\<Shareable Folders>. From there they can
also be linked to the test units using a drag & drop operation.
Parameterized test For high test coverage without significant programming effort, so-called
case lists parameterized test case and test sequence lists are supported.
To defined a test case list, a test case with input parameters must be defined, for
example, in C#:
[Export][TestCase]
public static void CheckMotor(int temperature, double voltage)
{
// ...
}
The test case list for this can be defined in the Test Table Editor, for example. The
command selection contains a CheckMotor [list] entry for this purpose. If this entry
is chosen, an editor appears that can be used to assign multiple values for each test
case parameter:
In addition to the input of individual values or a range, the use of list parameters and
struct list parameters from parameter files is supported as well (also see section
Parameters):
A test case list can not only be defined in the Test Table Editor but also in C#.
The [Values] and [Range] attributes are supported for this and can be used to
specify multiple values for each input parameter of a test case or test sequence
definition.
When the test execution tree is configured, the entire test case list is added.
For the definition of a test case list in the Test Table Editor or in C#, all language
combinations or crossovers listed in Language Interaction are supported.
Concept You can use the vTESTstudio to trace externally defined requirements and test
descriptions during test implementation and in the test report (traceability). This is
done using an exchange file in a predefined open XML format. As a result, any
REQM/TDM systems can be used coupled with vTESTstudio.
Import in The information exported from the REQM/TDM system is imported into vTESTstudio
vTESTstudio and can be linked there to test cases. The linked elements can be requirements or
test descriptions. Because these elements are used to achieve traceability, they are
designated as trace items.
Schema
Trace Item Explorer All trace items imported into a vTESTstudio project are available via the Trace Item
Explorer. From there, they can be easily linked to test cases using drag & drop.
In the REQM/TDM system, requirements and test descriptions can be structured in
hierarchical folders or comparable elements. These folders are displayed in the Trace
Item Explorer in the same hierarchy. However, folders cannot be directly linked to test
cases.
Traceability Matrix The Traceability Matrix in vTESTstudio gives an overview over all trace items of the
project and their test case links. By this overview of test design coverage you can
easily see, for example which trace items are not covered yet by any test case
implementation. Furthermore from within the traceability matrix comfortable
navigation from a trace item to linked test cases is possible. For documentation
purposes the traceability matrix can be exported to Excel. For synchronization with
the REQM/TDM system additionally export to XML is supported.
Test report For each trace item linked to a test case, the test report contains a corresponding
reference at the test case. This enables traceability from the test case result back to
the requirement or test description.
Import in The test report can be played back to the REQM/TDM system to be able to analyze
REQM/TDM system test results within this system.
Concept Out of a vTESTstudio project a test design documentation in PDF format can be
generated automatically. This test design documentation provides an overview of all
implemented test cases and test steps. Beyond the documentation it can be used for
internal and external reviews of the test design.
Features The CAPL Editor integrated in vTESTstudio provides the functions of a modern
development environment such as
> Code completion and syntax checking while writing
> Configurable syntax highlighting
> Syntax-sensitive indentation
> Expandable function blocks and function reference in a tree structure for faster
navigation
> Hierarchical function list with search function for direct transfer to the source text
> Direct transfer of network symbols, environment data, diagnostic symbols, and
parameters from the Symbol Explorer
User interface
3.2 C# Editor
Features Similar to the CAPL Editor, the C# Editor integrated in vTESTstudio provides the
functions of a modern development environment such as
> Code completion and syntax checking while writing
> Configurable syntax highlighting
> Syntax-sensitive indentation
> Expandable function blocks
> Hierarchical function list with search function for direct transfer to the source text
> Direct transfer of network symbols, environment data, diagnostic symbols, and
parameters from the Symbol Explorer
User interface
Access Automatically generated .NET classes are available for accessing signals and
environment data as well as CAN frames. These enable access to the values in the
CANoe runtime environment.
Example:
double value = EnvSpeedEntry.Value;
Event procedure In addition to the programming of test sequences, test cases, and functions, the
programming of event procedures is also possible with the C# Editor. In order to react
to events (e.g., a signal change) in CANoe, methods are provided with a special
attribute. The methods are then called if the event occurs during the test (exactly the
same as in CAPL).
Overview The Test Table Editor allows users to easily define test sequences in tabular form
without the need for programming expertise. Special commands are available for
stimulating and testing the system under test.
Features To make work easy, the following features are available:
> Command and symbol completion while writing
> Direct transfer of network symbols, environment data, diagnostic symbols, and
parameters from the Symbol Explorer
> Symbol and value type checks while editing
> Access to user-defined functions and test cases in other languages
> Ease of operation using both the keyboard and the mouse
User interface
Overview The Test Diagram Editor can be used to define tests in graphic form. Test code in
tabular notation is located behind each graphical element. By default one test case is
generated for each path through the diagram; a more fine-grained test case definition
is possible as well.
Features To make work easy, the following features are available:
> Easy configuration through the insertion of graphic elements into the graphic
interface using a drag & drop operation
> Command and symbol completion while writing
> Direct transfer of network symbols, environment data, diagnostic symbols, and
parameters from the Symbol Explorer
> Symbol and value type checks while editing
> Access to user-defined functions and test cases in other languages
> Usage and re-use of sub-diagrams possible
> Display/preview of generated test cases and their content in table form
User interface
Note: The Test Diagram Editor is only available with the Graphical Test Design
option.
Access The integration of description files for the system environment (databases, diagnostic
descriptions) enables easy direct access to symbols of the CANoe system
environment. The database symbols, system variables, etc., contained in the system
environment are available for use in the test coding. The symbols can be inserted into
the test sequences in two different ways: via text completion in the individual editors
or using a drag & drop operation from the Symbol Explorer.
Figure 19: Symbol Explorer for inserting symbols using drag & drop
Creating a test unit In vTESTstudio an executable test unit can be created. An executable test unit has
the extension *. VTUEXE and contains all necessary data for the test (source files,
parameter files).
Configuring and The executable test unit can be configured and executed in CANoe.
executing a test unit
For the execution in CANoe in the CANoe configuration any number of test
in CANoe
configurations can be created.
A test configuration can again contain any number of executable test units that will be
executed in sequential order.
During the execution of a test unit in CANoe a detailed test report is created
automatically.
Debugging CANoe supports debugging of CAPL and C# code that is part of a test unit.
5 Language Interaction
Overview Interface functions allow for functions of one language to be used in another one. An
interface function can be a test case, a test sequence, a test function, or a simple
function. Other than the test function the simple function is not represented as a block
in the report.
Definitions An interface function can be defined as follows in the respective languages:
> C#:
Attribute [Export] on test cases, test sequences, test functions or simple
functions.
> CAPL:
Keyword export ahead of test cases, test sequences, test functions or functions.
> Test Table Editor:
Export setting on test cases, test sequences or functions which are defined in the
functions view.
All interface functions which are available within a test unit are displayed in an
explorer.
Explorer
Out of the explorer, the functions can be added to the respective editors using drag &
drop. Alternatively the functions can be added to the editors by the use of the text
input completion feature.
Defining Language
Calling Language
CAPL C# Test Table Test Diagram
CAPL
C#
Test Table
Test Diagram
6.1 Parameters
6.1.1 Concept
Definition The term "parameter" refers to any constant value that can be accessed within the
test sequence from all implementation languages.
Examples of parameters: Configuration parameters for a control unit, test vectors,
tolerances, etc.
Parameters are defined and maintained in separate files. Available parameters are
displayed in the Symbol Explorer within the tab Parameters.
Kinds There are several kinds of parameters:
> (Scalar) Parameter:
A scalar parameter represents exactly one constant value that can be accessed
in the test sequence.
Example:
Name Value
CycleTimeTolerance 50
Classification Tree By an integrated editor for the classification tree method test case data - in terms of
Method test vectors - can be defined. The graphical user interface supports finding the
relevant input data for a test. Automatic or manual combination of all crucial input
values allows to efficiently defining the minimum number of required test vectors.
User interface
Parameterization of The test vectors can be used in implemented test cases, e.g. for the parameterization
test case lists with of test case lists in the Test Table Editor (see section Concepts for High Test
test vectors Coverage).
Figure 22: Usage of test vectors for the parameterization of a test case list in the Test Table Editor
6.2 Curves
Stimulation curves By the use of the so-called Waveform Editor curves for the stimulation of the system
under test can be defined. Predefined segment types (sinus, pulse ) enable easy
definition of e.g. voltage curves defined by ECU test standards like LV124.
Multiple curves can be synchronized easily within the same editor.
6.3 Variants
Variant properties Control unit variants and test variants can be realized using so-called variant
properties.
Examples:
Variant Property Possible Values
Region US, Europe, Asia
Coverage full, low, medium
Model OEM1, OEM2
Access Variant properties can be used for conditional test coding as well as for access to
variant-dependent parameter values and for defining variant-dependent test cases or
whole test groups.
Parameter value
dependent on a
variant property
Variant-dependent
test cases
Transfer Variant properties can be easily transferred to the test code from the Symbol Explorer
or using text completion.
Variant properties in
the Symbol Explorer
7 Use Cases
7.1 Generating Two Similar Test Units for Different OEMs page 42
Setup There is a vTESTstudio project for the test of the door control unit. It consists of two
test units one for OEM1 and one for OEM2. The actual sequence logic is the same
for both OEMs. It is implemented in a test table Main.vtt and is used in both test units
by a file link. For information on linking files to test units, also see Re-Use of Files.
Various tolerance values are accessed during the test. These are dependent on the
OEM. An OEM variant property is declared for this purpose with two possible values:
OEM1 and OEM2.
The tolerances themselves are defined in a parameter file. The specific tolerance
values are defined according to the OEM variant property.
To ensure that the correct parameter value is used during the test execution, the user
only has to set the correct value of the OEM variable property in each case in the
configuration dialog of the test units.
Figure 31: Defining the variant property value for the LockingTests_OEM1 test unit
The implementation of the function takes place in two C# files, one of which contains
the implementation for OEM1 and the other the implementation for OEM2:
The file for OEM1 is added to the first test unit and the file for OEM 2 is added to the
second test unit:
> News
> Products
> Demo Software
> Support
> Training Classes
> Addresses
www.vector.com