Open Test Framework  
Project Structure

In order to be able to work with the OTF, knowledge of the project structure is very important. The project structure is the first entry into the OTF and the Solution Explorer is the door to understand it.

Related Topics

Projects and Solutions

An OTX project includes all files and settings that are necessary for OTX. OTX projects are executable and can be redistributed. Individual OTX files cannot do this. OTX projects can refer to each other. Several OTX projects are combined in a so-called Solution. The Solution Explorer is the central entry point in the development environment. The Solution Explorer displays all OTX elements like projects, packages, @refs OpenTestSystem.Otx.Core.Otx "documents", imports, global declarations, procedures, procedure parameters and local declarations in a hierarchical tree structure. The Solution Explorer has an integrated version control. A Solution will be loaded, can be edited and it consists of one or more projects of different types. There are the following project types:

An OTX project (Procedure Project) is a self-contained entity that can be transported and executed. On the file system, an OTX project is a folder containing a project file. One project per Solution can be marked as a start project. The start project serves as an entry point for the runtime environment. An OTX project contains one or more OTX packages. An OTX package is also a folder on the file system and corresponds to the so-called namespace of the OTX elements contained. The namespace uniquely identifies each OTX element. The namespace is necessary to address visible elements of other @refs OpenTestSystem.Otx.Core.Otx "documents". An OTX package contains one or more OTX @refs OpenTestSystem.Otx.Core.Otx "documents".

An OTX document corresponds to an OTX file and can contain global declarations and procedures. One document per project can be marked as the start document. A start document must contain a main procedure. The start document serves as an entry point for the runtime environment. An OTX document contains one or more OTX procedures. An OTX procedure is the executable part of an OTX document. Furthermore, the special main procedure is the entry point for the execution of an OTX document and a procedure can call another procedures in- or outside the document at any depth.

If an OTX document wants to access the visible elements of another documents, then the other @refs OpenTestSystem.Otx.Core.Otx "document" must be listed in the Imports area. A document can import @refs OpenTestSystem.Otx.Core.Otx "documents" from the same package or from other packages inside the same or other projects.

Analogies

For a better understanding, the following table compares the terminologies of OTX with other programming languages like DotNet and Java. For example, in Java, the solution is called a workspace. A PTX file corresponds to a DLL in DotNet and to a JAR file in Java. An OTX document is a class in DotNet and Java, and an OTX procedure is a method.

OTX DotNet Java
Solution Solution Workspace
Project Project Project
PTX DLL JAR
Package Namespace Package
Document Class Class
File (*.otx) File (*.cs) File (*.java)
Procedure Method Method

Solution

The solution is just a container for related projects. It consists of one or more projects. It helps to group related projects together.

Note: OTF automatically generates a solution when a new project is created.

Note: A complete solution can be exported as a ZIP file for distribution, see Solution (root node).

Note: A complete solution can be graphically displayed inside an overview page, see Solution Overview Page.

Storage structure on the file system

The solution contains all projects in a folder with the name of the project. It contains the solution settings in two files. The file with the extension otfSln organizes projects and saves solution settings. The file with the otfSuo extension stores user-specific settings, such as breakpoints, recently opened files etc. A project folder can be saved completely in a ZIP archive for exchange.

Settings

A solution has a set of settings, see Solution Settings. The settings are stored in the two files:

Filename Content
NameOfSolution.otfSln Contains the project structure and all dependencies (mandatory)
NameOfSolution.otfSuo Contains temporary project settings like break points etc. (optional)

Note: The otfSuo file can be deleted. Only user-specific settings are lost. In the unlikely event that a project folder can no longer be opened, deleting this file is usually sufficient.

OTX-Procedure Project

An OTX-Procedure Project is the main project type. It is used in a Solution to logically manage OTX documents and project settings for building, executing and debugging test sequences. A procedure project contains all the elements that constitute the OTX test sequences, such as the OTX packages, OTX documents, procedures, nodes, etc. It also contains the environment settings to execute the test sequences. A procedure project can reference one or many procedure projects or PTX files. A procedure project or a PTX can also be referenced by another project (OTX-Procedure Project, Player Project, or Test Project).

Note: When executing or building a procedure project, the OTF will generate binary files for the current project and all the projects referenced by it. The binary files will be generated in the CppOutput folders of all the related projects.

Transport and Sharing

A procedure project can be transported via a PTX File.

Storage structure on the file system

A procedure project consists of a project settings file NameOfProject.otfPrj and the following folders:

Folder Name Content
CppOutput Contains all binary files generated for execution.
i18n Contains i18n-Extension settings, such as multilingual text libraries; see Project Settings for more information.
Logging Contains Logging-Extension settings; see Project Settings for more information.
OTX Contains all the OTX packages or OTX documents.
OTX-Backup Contains the OTX backup files; see OTF Settings and Project Settings for more information.
OTX-Mapping Contains OTX Mapping files otfMap for use with extensions like HMI, Measure, ExternalServiceProvider.
PTX Contains PTX libraries statically bound to the project.
Quantity Contains Quantity-Extension settings, such as ODX files with UNIT-SPECS; see Project Settings for more information.

A procedure project has a set of settings, see Procedure Settings. The settings are stored in the following files:

Filename Content
NameOfProject.otfPrj Contains the project structure and all dependencies (mandatory)

References

All global elements with sufficient OpenTestSystem::Otx::Core::Visibility inside an OTX document can be referenced and used by another OTX document. The following elements can be referenced:

  1. OpenTestSystem::Otx::Core::Validity
  2. Signatures
  3. Global Declarations
  4. Procedures

Before a global element can be referenced, the document containing the global element must be imported. If the document is outside the project, a reference to the outside project must be added; see Project Settings for more information.

Test Project

A Test Project is like a normal OTX-Procedure Project, but only for OTX Unit-Test procedures. A Test Project can only executed in a special environment like the OTF and the TestExecution application, but not inside the OTX-Runtime API.

Note: It is a design goal to separate the Unit-Tests from the test logic. Therefore test projects or PUX files cannot be referenced by another projects (OTX-Procedure Project, Player Project, or Test Project) and cannot be executed with the OTX-Runtime API.

Player Project

With a player project an OTX based tester for quick and easy distribution of executable OTX sequences can be created without any programming knowledge. A player project can be executed inside the Open Test Player.

A player project refers to one or more Procedure Projects or PTX files. A player player project contains of acontrol file and a of one ore more monitors. A control file contains a list of procedures and one or more control sequences which describe the sequential and parallel execution of OTX procedures by the OTX Runtime API. A monitor is a graphical user interface with certain layouts which will be displayed inside the Open Test Player. A player project can be stored into a PPX file.

Note: A player project or a PPX cannot be referenced by OTX-Procedure Project, Player Project, or Test Project.

Note: A PPX can be executed via the OTX-Runtime API.

Structure

A player project consists of a layout file *.playLay, a playlist file *.playLst, a settings file *.playPrj and the following folders:

Folder Name Content
ControlFile Contains all the control files which can be used within the current player project.
i18n Contains i18n-Extension settings, such as multilingual text libraries; see Player Settings for more information.
Logging Contains Logging-Extension settings; see Player Settings for more information.
OTX-Mapping Contains mapping files (*.otfMap) for use with extensions like HMI, Measure, ExternalServiceProvider, and so on; see ProjectSettings for more information.
PTX Contains projects used within the player project.
Quantity Contains Quantity-Extension settings, such as ODX files with UNIT-SPECS; see Player Settings for more information.

A player project has a set of settings, see Player Project Settings. The settings are stored in the following files:

Filename Content
NameOfProject.playPrj Contains the project structure and all dependencies (mandatory)
NameOfProject.playLay Contains the monitor layouts
NameOfProject.playLst Contains the control file

Playlist Project (Old player project, deprecated)

The playlist projects do not directly contain the OTX test sequences, but they contain layouts of how the test sequences are presented in the OpenTestPlayer (OTP), etc. The layouts contain the command buttons and controls bound to the procedures and declarations of the other procedure projects. They are used in the solution to manage the layouts and the settings, including the references to the OTX test sequences. A playlist project can be packaged into a PPX zipped file. A playlist project can reference procedure projects or PTX files. However, a playlist project or a PPX cannot be referenced by other procedure/player/playlist/test projects.

Structure

A playlist project consists of a layout file *.playLay, a playlist file *.playLst, a settings file *.playPrj and the following folders:

Folder Name Content
i18n Contains i18n-Extension settings, such as multilingual text libraries; see Playlist Settings for more information.
Logging Contains Logging-Extension settings; see Playlist Settings for more information.
OTX-Mapping Contains mapping files (*.otfMap) for use with extensions like HMI, Measure, ExternalServiceProvider, and so on; see ProjectSettings for more information.
PTX Contains PTX libraries used within the playlist project.
Quantity Contains Quantity-Extension settings, such as ODX files with UNIT-SPECS; see Playlist Settings for more information.

Note: The definition of a playlist project is stored in the following files: the *.playLay file, the *.playLst file, and the *.playPrj file. The basic folder of a playlist project is the PTX folder, with all the files and sub-folders inside. Unspecified settings of OTX extensions will be adjusted to default values.