Open Test Framework  
OTX-Mapping Data Type Conversions

For read and write access to an external system (DLL), the data types must be converted between the external system and the OTX. The rules for the automatic conversion are described in the following section.

A data type conversion can be performed automatically or explicitly:

  1. Automatic Conversion
    Automatic conversion is performed for all conversions that can be performed unambiguously and safely without throwing an exception. The DefaultCustomImplementation supports automatic conversion!
  2. Explicit Conversion
    With the explicit conversion in principle every data type can be converted. But the conversion must be supported by a certain custom implementation. The DefaultCustomImplementation does not support explicit conversion!

Important: The automatic conversion must be supported by all custom implementations!

During automatic conversion, the mapping editor checks for permissible data types (see below). Explicit conversion can be enabled for a parameter using the "Convert" checkbox. During explicit conversion, the mapping editor does not check whether the data types are convertible. All conversions are permissible. In this case, the user is responsible for ensuring error-free conversion.

Important: With explicit conversion, the user is responsible for error-free conversion!

Conversion direction and OTX parameter types

There are two conversion directions. Each direction has the following associated OTX declaration types.

  1. Conversion direction DLL to OTX
  2. Conversion direction OTX to DLL

Supported OTX Data Types

Only the following OTX data types are supported:

  1. String
  2. Boolean
  3. Integer
  4. Float
  5. ByteField
  6. Enumeration
  7. BlackBox
  8. List
  9. Map
  10. Structure

Note: The BlackBox data type allows mapping to any external data type.

Note: The user-defined data types List, Map, and Structure can recursively contain the supported data types (including List, Map, and Structure) in any combination and depth.

Automatic Conversion

The following table lists all possible automatic conversions from DLL to OTX and vice versa. The mapping editor lists all parameters with permitted data types for mapping. The conversion occurs automatically. The conversion checkbox is not selected.

Note: The external data types (DLL) may have different names depending on the target system (C++, DotNet, or Java).

Conversion Direction DLL to OTX
DLL OTX
String Boolean Integer Float ByteField Enumeration BlackBox
string Yes Yes
bool YesA Yes Yes Yes Yes
int, long Yes Yes Yes Yes
float, double YesB Yes Yes
byte[] Yes Yes
enum YesC Yes Yes Yes
AnyOtherType Yes
Legend: A: "true" or "false" | B: Point as floating point separator , e.g. 10.2 | C: Name of the enumeration element
Conversion Direction OTX to DLL
OTX DLL
string bool int,long float, double byte[] enum AnyOtherType
String Yes
Boolean YesA Yes Yes Yes
Integer Yes Yes Yes
Float YesB Yes
ByteField Yes
Enumeration YesC Yes Yes
BlackBox Yes Yes Yes Yes Yes Yes Yes
Legend: A: "true" or "false" | B: Point as floating point separator , e.g. 10.2 | C: Name of the enumeration element

Note: Lists, Maps, and Structures can be mapped with the data types specified above in any combination and depth. The structural design of the @รง List, Map, or Structure (structure: element name and element data type) must be identical. For example, a List<List<Integer>> can be mapped to a List<List<String>.

Note: Only three levels are tested!

Important: The Mapping-Editor checks the correct data types only for automatic conversion!

Important: The Default Custom Implementation will throw an exception, if the data types cannot be converted automatically.

Explicit Conversion

For explicit conversion, the conversion checkbox must be set in the mapping editor. Any data type can then be mapped.

Important: The editor does not check for correct conversion. Users must implement special conversions themselves using their own custom implementation!