Introduction
The ELT development environment natively supports writing integration tests using Robot Framework, pytest or Nose.
The test tool etr
was created to act as a unified interface for executing integration or system
tests implemented using different test frameworks/runners, and to provide a mechanism for
introducing ELT specific behaviour if necessary, such as setting up the test environment.
Scope
This document is the user manual for the ELT ICS Framework - Test Framework tool etr
. The
intended audience are users of etr
e.g. ELT ICS Framework users, developers or software quality
assurance engineers.
Although etr
is a product of the ELT ICS Framework it does not depend on any other ICS Framework
products and can be installed and used standalone.
Acronyms
- ELT
Extremely Large Telescope
etr
Extensible Test Runner
- ICS
Instrument Control System
Style Conventions
YAML Data Structures
This manual documents a number of YAML data structures, their “schema”, using these common conventions.
Typically a concrete example is first provided:
name: example
optional: 3.0
nestedAnonymous:
nestedProperty: value
This top level structure is then documented, sometimes with named sub-objects. The types of each
property use Python Variable Annotation syntax. For
example a string would be str
, a YAML object would be object
, a list of strings would be
List[str]
, a union of two alternative named objects like above would use Union[type1,
type2]
, a list of union of named types would be List[Union[type1, type2]]
.
Unions are used when multiple type alternatives are allowed.
Each property of an object, consisting of a <name>, <type> and <default> is then documented as follows:
<name>
(<type>) <default>Documentation for property with name “<name>” type “<type>” and optionally a default value <default>.
If <type> must have a specific value, the literal value may be indicated instead.
If property is optional, the <type> can specify this using Python annotation syntax:
Optional[<type>]
. If there is a default value, <default> specifies it as[default DEFAULTVALUE]
. Lists are often optional and in this case it is simply indicated by a default empty list value:[default: []]
. When a property is optional and no value should be provided, the property should simply be omitted from the object rather than specify a null value.If a property is an anonymous object with nested properties, it will be documented inline with nested indentation (see example below).
Documenting the named example structure above would look like:
Example {YAML}
(object)
name
(str)Name property.
optional
(Optional[float]) [default: 1.0]Optional property of float type with a default value of 1.0.
nestedAnonymous
(object)Example of how nested anonymous objects are documented.
nestedProperty
(str)A nested property of this anonymous object.