E.2 ETR 141 rules and applicability

34.123-33GPPPart 3: Abstract test suite (ATS)TSUser Equipment (UE) conformance specification

RULE 1: Statement of naming conventions

Naming conventions should be explicitly stated. Naming conventions should not exist only for a single ATS, and the reader of an ATS should not be forced to "derive" the rules implicitly. The naming conventions should be part of the ATS conventions contained in the ATS specification document.

Names used in the present annex are comprised of a prefix part and a name body part. Conventions for deriving prefixes and name bodies are described after Rule 3 in the present annex.

RULE 2: Coverage of naming conventions

Naming conventions stated should, as a minimum, cover the following TTCN objects:

– test suite parameters/constants/variables;

– test case variables;

– formal parameters;

– timers;

– PDU/ASP/structured types;

– PDU/ASP/structured types constraints;

– test suite operations;

– aliases;

– test case/test step identifiers.

RULE 3: General properties of naming conventions

a) Protocol standard aligned

When there is a relationship between objects defined in the ATS and objects defined in the protocol standard, e.g. PDU types, the same names should be used in the ATS if this does not conflict with the character set for TTCN identifiers or with other rules. In case of a conflict, similar names should be used.

b) Distinguishing

The naming conventions should be defined in such a way, that objects of different types appearing in the same context, e.g. as constraint values, can be easily distinguished.

c) Structured

When objects of a given type allow a grouping or structuring into different classes, the names of these objects should reflect the structuring, i.e. the names should be composed of 2 or more parts, indicating the particular structure elements.

d) Self-explaining

The names should be such that the reader can understand the meaning (type/value/contents) of an object in a given context. When suffixes composed of digits are used, it is normally useful to have some rule expressed explaining the meaning of the digits.

e) Consistent

The rules stated should be used consistently throughout the document, there should be no exceptions.

f) Appropriate name length

Following the above rules extensively may occasionally lead to very long names, especially when structuring is used. The names should still be easily readable. When TTCN graphical form (TTCN.GR) is used, very long names are very inconvenient.

NOTE: Also, test tools may not be able to implement very long identifier names, which is an important aspect in this context.

E.2.1 Multiple words are separated by upper case letters at the start of each word

Many names consist of more words, and it shall be easy to distinguish the different words building up the same name. For all TTCN Object classes this is done using the case of the letters.

This rule is mandatory for all names appearing in the body of a dynamic behaviour table, and is recommended for all other TTCN object classes.

Generally every word a name consists of shall start with an upper case letter and the rest of this word shall be in lower case letters.

– E.g.: "channel" + "description" -> "ChannelDescription".

This rule also applies if a word starts after another upper case letter.

– E.g.:. "px" + "Cell" + "A" + "Cell" + "Id" -> px_CellACellId.

This rule also applies if the name has a prefix, which is always lower case.

– E.g.: A test case variable "sequence" + "number" -> tcv_SequenceNumber.

This rule does not apply if the word is a unit, in which case the word retains it’s original case.

– E.g.: Power level 1.5 dBm ->PowerLvl1_5dBm.

This rule does not apply if the word in the name is an acronym, in which case the word retains it’s normal case.

– If an acronym is followed by another word, an underscore shall be used to separate the acronym from the following word. If an acronym is followed by a number in order to represent an identity (e.g. channel or radio bearer identity) then this acronym is not followed by an underscore.
E.g.: "this" + "Is" + "SIM" + "Message" + "With" + "CC" + "And" + "RR" + "Things" + "In" + "It" -> "thisIsSIM_MessageWithCC_AndRR_ThingsInIt".

– An exception to acronyms retaining their case is if the name is a field / element / parameter in a structured type / PDU / ASP, in which case it must start with a lower case letter.
E.g.: "SCH" + "info" + "element" -> "sCH_InfoElement".

– A further exception to acronyms retaining their case is if the name is an ASN.1 constraint, in which case, in which case the first letter is upper case, and the remaining letters are lower case.

For all objects used in the body of dynamic behaviour tables, use of underscores is forbidden, except for the following situations:

– As a replacement for a ‘.’. E.g. Test case that maps to prose clause 7.2.3.1 -> tc_7_2_3_1.

– To separate prefixes from names.

– To separate acronyms from the following word.

– To separate a number from the following word.

– To replace hyphens when types are re-used / imported from core specifications. This applies to types imported from ASN.1 definitions, and to names derived from table definitions in core specifications.

– To separate an ASP name from the embedded PDU name when the metatype PDU is not used.
E.g. RRC_DataInd_ConnAck for an RRC data indication ASP with an embedded CONNECT ACKNOWLEDGE PDU.

E.2.2 Identifiers shall be protocol standard aligned

To support rule 3(a), the mapping guidelines in table E.2.2 shall be used. This mapping table also supports rule 6.

Table E.2.2: Mapping guidelines between protocol standards and identifiers

Type

Naming rule

Objects of Structured Type

Shall be derived from the name of the Information Element in the standard, if it corresponds to this (use standard acronyms where appropriate).

E.g.: "Window Size super-field" -> "WindowSizeSUFI"

Fields in a Structured Type

Shall be derived from the name of the same field in the corresponding Information Element in the standard. (Acronyms for the entire field name shall not be used)

E.g.: "Header Extension Type" -> "headerExtensionType" (not "HE")

Objects of ASP type

Shall be derived from the name of the corresponding Service Primitive in the Standard, using any relevant abbreviations from the present annex. The full name as it appears in the core specification shall be included in parentheses after the name.

E.g.: "CRLC-SUSPEND-Conf" -> "CRLC_SuspendCnf (CRLC-SUSPEND-Conf)"

If the metatype PDU is not used, the ASP name shall reflect both the ASP, and the embedded PDU name, using an underscore to separate the ASP part from the PDU part.

E.g.: DataReq_StartDTMF_Ack for an RRC-DATA-Req with an embedded START DTMF ACKNOWLEDGE PDU

Objects of PDU type

Shall have exactly the same name as the Message it corresponds to in the standard. If this Message is named by more words, they shall be joined, leaving the blanks out

E.g.: "AMD PDU" -> "AMDPDU".

E.2.3 Identifiers shall be distinguishing (use of prefixes)

To support rules 2, 3(b), 4, and 5, the prefixes shown in table E.2.3.1 shall be used for TTCN objects. Prefixes are separated from the name by an underscore to improve readability by clearly separating the prefix from the name. This convention will also support searching operations. For example, a search for all uses of PIXIT parameters in the test suite is possible by searching for ‘px_’.

The optional <protocol> part shall be included in the name when the object is closely related to the protocol (e.g. PICS, some PIXIT parameters), it is necessary to be unambiguous or improves comprehension significantly (e.g. no need to think about protocol stacks on all used interfaces during reading). The optional <protocol> part shall be used for types defined in common modules.

Table E.2.3.1: Prefixes used for TTCN objects

TTCN object

Case of first character

Prefix

Comment

Test Suite

Upper

TTCN Module

Upper

Simple Type

Upper

[<protocol>_]

Note 8

Structured Type

Upper

[<protocol>_]

Note 8

Element in Structured Type

Lower

ASN.1 Type

Upper

[<protocol>_]

Note 8

Element in ASN.1 Type

Lower

Test Suite Operation

Upper

o_[<protocol>_]

Notes 1 and 8

TSO Procedural Definition

Upper

o_[<protocol>_]

Notes 1 and 8

Formal Parameter to TSO or TSOP

Upper

p_

Test Suite Parameter (PICS)

Upper

pc_[<protocol>_]

Note 8

Test Suite Parameter (PIXIT)

Upper

px_[<protocol>_]

Note 8

Test Case Selection Expression

Upper

[<protocol>_]

Note 8

Test Suite Constant

Upper

tsc_[<protocol>_]

Note 8

Test Suite Variable

Upper

tsv_[<protocol>_]

Note 8

Test Case Variable

Upper

tcv_[<protocol>_]

Note 8

PCO Type

Upper

PCO

Upper

Note 2

CP

Upper

cp_

Note 2

Timer

Upper

t_[<protocol>_]

Note 8

Test Component

Upper

mtc_[<protocol>_] or ptc_[<protocol>_]

Notes 3 and 8

Test Component Configuration

Upper

ASP Type

Upper

[<protocol>_]

Notes 4 and 8

Parameters within ASP Type

Lower

Note 4

PDU Type

Upper

[<protocol>_]

Notes 4 and 8

Fields within PDU Type

Lower

Note 4

Encoding Definition

Upper

enc_

Encoding Variation

Upper

var_

Invalid Field Encoding Variation

Upper

inv_

CM Type

Upper

cm_

Field within CM Type

Lower

Alias

Upper

a_

ASP constraint

Upper

ca[b|d][s|r|w]_[<protocol>_]

Notes 5 and 8

PDU constraints

Upper

c[b|d][s|r|w]_[<protocol>|AA|108]

Notes 5, 8 and 10

Constraint (other types)

Upper

c[b|d][s|r|w]_[<protocol>_]

Notes 5 and 8

Formal Parameter for a Constraint

Upper

p_

Test Case Group

Upper

<protocol>/

Note 8

Test Step Group

Upper

Test Case

Upper

tc_

Note 6

Test Step

Upper

(ts_|pr_|po_)<CN domain>_<protocol>_

Notes 7, 8 and 9

Local tree

Upper

lt_

Defaults

Upper

<protocol>_

Note 8

NOTE 1: Coding rules are not specified for test suite operation procedural definitions at this stage. These rules will be defined when the need arises

NOTE 2: A prefix is not used for PCO declarations, but is used for CP declarations. This is because PCOs and CPs will only be used in send and receive statements, and PCOs will be used more frequently than CPs. Since a PCO name or a CP name will be used on most behaviour lines, PCO names should be as short as possible – E.g. 2 to 3 characters.

NOTE 3: The prefix is mtc if the component role is MTC, or ptc if the component role is PTC. If multiple PTCs are used, the rest of the identifier will clarify which PTC is being referred to. E.g. ptc_Cell1, ptc_Cell2.

NOTE 4: This applies for both tabular and ASN.1 definitions.

NOTE 5: Constraint prefixes are built up from the following regular expression. c[a][b|d][s|r|w].

– ‘c’ shall always be present to indicate that the object is a constraint.

– ‘a’ shall be present for ASP constraints to distinguish them from PDU constraints.

– ‘b’ shall be present if and only if the constraint is used as a base constraint. (i.e. included in the derivation path of any other constraint).

– ‘d’ shall be present if the constraint is derived from another constraint.(i.e. has an entry in it’s derivation path field)

– ‘b’ and ‘d’ cannot both be used in the same constraint, thereby limiting the derivation path to 1.

– For the purpose of the present note, the following definitions are required (see TR 101 666 [27] clause 12.6.2):

– The term ‘field’ is used to represent a structured type element, an ASP parameter, or a PDU field.

– A ‘bound field’ is a field that either contains a SpecificValue, or is Omitted (-).

– An ‘unbound field’ is a field that contains any of the following matching mechanisms: Complement, AnyValue (?), AnyOrOmit (*), ValueList, Range, SuperSet, SubSet, AnyOne (?), AnyOrNone (*), Permutation, Length, or IfPresent.

– ‘s’ may optionally be present if the constraint is only used in send statements. ‘s’ shall not be present if the constraint contains any unbound fields, or any fields chained to a constraint whose prefix includes ‘w’ or ‘r’.

– ‘r’ may optionally be present if the constraint is only used in receive statements.

– ‘w’ may optionally be present to indicate that the constraint contains fields that are unbound. Before these constraints are used in SEND events, all unbound fields must either be bound by using a derived constraint, or explicitly assigned a value in the SEND event behaviour line.

– Either ‘w’ or ‘r’ shall be used if any fields in the constraint are unbound or are chained to a constraint whose prefix includes ‘w’ or ‘r’.

NOTE 6: Test case names will correspond to the clause in the prose that specifies the test purpose. E.g. tc_7_2_23_2. An additional digit may be specified if more than one test case is used to achieve the test purpose. If an additional digit is required, this probably means that the test prose are not well defined.

NOTE 7: Test steps may optionally use the prefixes pr_ or po_ to indicate that the test step is a preamble or postamble respectively.

NOTE 8: Protocol abbreviations are provided in table E.2.3.2. Protocol abbreviations may optionally be used to clarify the scope of TTCN objects, or to resolve conflicts when the same name is required by multiple protocols within the ATS. The protocol abbreviation indicates that the object is related to a particular procedure (e.g. an MM procedure). This does not prevent the object from being used by an ATS testing a different protocol. If an object is specific to one ATS, this should be indicated in comments, rather than using a protocol abbreviation (e.g. if a timer is only used in RLC tests this should be stated in the comments, rather than using the abbreviation RLC in the timer name).If two different types exist in the ATS that represent the same information (e.g. IMSI) conversion operations shall be used to ensure consistency between the types. Also, conversion operations shall be used to avoid asking the same PIXIT question twice. For example, if a type is defined as an OCTETSTRING[4] for a NAS protocol, and the same type is represented as a BITSTRING[32] for RRC, a single PIXIT question shall be asked, and conversion operations shall be used to ensure that the same value is used for both types.

NOTE 9: The prefixes CS and PS may optionally be used to indicate that a test step is specific to circuit switched, or packet switched signalling respectively. For test steps specific to the Upper Tester, the prefixes AT or MMI or UT shall be used to indicate that, respectively, AT or MMI or both types of commands are used.

NOTE 10: The prefix AA shall be used for RRC PDU constraints to indicate that it is defined in 3GPP TS 34.123-1 [1] annex A. The prefix 108 shall be used for RRC PDU constraints to indicated that it is defined in 3GPP TS 34.108 [3] clause 9.

Table E.2.3.2: Protocol abbreviations for prefixes

Protocol / prefix

BMC

CC

CS

GMM

MAC

MM

PDCP

RLC

RRC

SMS

SS

SUS (Supplementary services)

TC

E.2.4 Identifiers should not be too long (use standard abbreviations)

To assist in keeping TTCN identifiers shorter, table E.2.4 provides a non-exhaustive set of standard abbreviations that shall be used when naming objects that are used in the body of dynamic behaviour tables. Consistent use of abbreviations will improve test suite readability, and assist maintenance.

Table E.2.4: Standard abbreviations

Abbreviations

Meaning

Acs

access

Acp

accept

Ack

acknowledge

act

activation

addr

address

(re)alloc

(re)allocated, (re)allocation

arg

argument

ass

assignment

auth

authentication

ava

avail, available

bCap

bearer capability

cau

cause

clg

calling

ch

channel

chk

check

ciph

cipher, ciphering

cld

called

clsmk

classmark

cmd

command

cmpl

complete

cnf

confirm

cfg

configuration

conn

connect

ctrl

control

def

default

descr

description

disc

disconnect

enq

enquiry

err

error

(re)est

(re)establish

ext

extended

fail

failure

ho

handover

id

identity / identification

ie

information element

iel

information element length

ind

indication

info

information

init

initialize

lvl

level

loc

location

locUpd

location update

max

maximum

mgmt

management

min

minimum

misc

miscellaneous

mod

modification

ms

mobile station

msg

message

mt

mobile terminal

neigh

neighbour

ntw

network

num

number

orig

origin/-al

pag

page/-ing

params

parameters

perm

permission

phy

physical

qual

quality

rand

random

ref

reference

reg

register

rej

reject

rel

release

req

request

rsp

response

rx

receiver

sel

selection

seq

sequence

serv

service

st

state

sysInfo

system information

sync

synchronization

sys

system

tx

transmitter

RULE 4: Specific naming rules for test suite parameters/constants/variables test case variables
and formal parameters

  1. The name should reflect the purpose/objective the object is used for.
  2. If the type is not a predefined one, it is useful that the name reflects the type, too.
  3. It could be useful, that the individual naming conventions are not the same for all object classes this rule applies to. e.g. use upper case letters for test suite parameters/constants, and use one of the other possibilities presented in ETR 141 [37] example 1 for other object classes.

See also ETR 141 [37], clauses 5.1 to 5.4 for further discussion on naming test suite parameters.

RULE 5: Specific naming rule for timers

If the timer is not defined in the protocol to be tested, the name should reflect the objective of the timer used for testing.

NOTE: There is no need to indicate the object type "timer" in the name, since timers only occur together with timer operations

RULE 6: Specific naming rule for PDU/ASP/structured types

As far as applicable, derivation rules or mapping tables should be used to relate the names of the types to the corresponding objects in the protocol or service definition.

NOTE: There may be types, e.g. erroneous PDU types, that do not relate to an object in the protocol or service definition.

Whenever names of types are derived from ASN.1 type definitions provided in the core specifications, the names shall remain the same as the ASN.1 specifications, and references shall be provided in the comment fields.

RULE 7: Specific naming rule for PDU/ASP/structured types constraints

Rules should be stated to derive the names from the names of the corresponding type definitions. It is often possible to use the type name plus an appropriate suffix reflecting the specific constraint value. In case of lengthy names, useful abbreviations or a defined numbering scheme can be chosen.

Constraint names begin with the appropriate prefix, followed by the first letter of each word in the type, followed by words describing the peculiarity of the constraint. E.g. Type = RadioBearerSetupPDU, constraint name could be cb_RBSP_GenericUM_DTCH.

RULE 8: Specific naming rule for test suite operations

The name should reflect the operation being performed.

i.e. the name should indicate an activity, not a status. This can be achieved e.g. by using appropriate prefixes like "check", "verify", etc.

RULE 9: Specific naming rule for aliases

The name should reflect that aspect of its expansion, that is important in the situation where the alias is used. Derivation rules should be provided to derive the alias name from its macro expansion or from the name of an embedded ASP / PDU.

See also ETR 141 [37], clauses 6.3.6 and 9 for further guidelines on naming aliases.

RULE 10: Specific naming rule for test steps

The name should reflect the objective of the test step.

RULE 11: Selecting the ASN.1 format for type definitions

  1. If the protocol standard uses ASN.1 to specify the PDUs, the ATS specifier should also use ASN.1.
  2. If the protocol standard does not use ASN.1, check carefully whether features of ASN.1 that the tabular format of type definition does not present are necessary in the ATS, or could ease the design and understanding of the definitions as a whole. Check especially whether fields or parameters have to be specified, the order of appearance of which, in a received ASP/PDU, cannot be predicted. If any of these conditions apply, use ASN.1 for type and ASP/PDU type declarations.
  3. Use the option of "ASN.1 ASP/PDU type Definitions by Reference" whenever applicable.
  4. Example 14 shows a compatibility problem that could occur, when ASN.1 type declarations as well as tabular type declarations are used in an ATS. Use the ATS Conventions to describe how this compatibility problem is handled in the ATS, i.e. whether in expressions and assignments entities defined in ASN.1 are only related to entities defined in ASN.1 or not.

Names of ASN.1 objects shall be kept the same as the core specifications in this case, even where the names are at odds with the naming conventions adopted for other TTCN objects.

RULE 12: Further guidelines on type definitions

  1. Use simple type or ASN.1 type definitions whenever an object of a base type with given characteristics (length, range, etc.) will be referenced more often than once.
  2. Use the optional length indication in the field type or parameter type column of structured type and ASP/PDU type definitions whenever the base standard/profile restricts the length.

NOTE 1: This can often be achieved by references to simple types.

  1. Map the applicable ASPs/PDUs from the service/protocol standard to corresponding ASP/PDU type definitions in the ATS.

NOTE 2: It may happen that not all ASPs/PDUs of a service/protocol standard are applicable to a particular ATS for the related protocol. It may also happen that additional ASP/PDU type declarations are necessary, e.g. to create syntactical errors.

  1. Map the structure of ASPs/PDUs in the service/protocol standard to a corresponding structure in the ATS.

NOTE 3: This mapping is not always one-to-one, e.g. because a field in the PDU definition of the protocol standard is always absent under the specific conditions of an ATS. But it should normally not happen, that a structured element in the protocol standard is expanded using the "<-" macro expansion, so that the individual fields are still referenced, but the structure is lost in the ATS.

RULE 13: Specification of test suite operations

  1. Use a test suite operation only if it cannot be substituted by other TTCN constructs.
  2. Write down the rationale/objective of the test suite operation.
    Reference standards if applicable.
  3. Classify and simplify algorithm.
    Split test suite operation if too complex.
  4. Choose an appropriate specification language depending on the rationale/objective:
    – predicates for Boolean tests;
    – abstract data types for manipulation of ASN.1 objects;
    – programming languages for simple calculation.
  5. Check/proof the test suite operation:
    – is the notation used known/explained;
    – are all alternative paths fully specified;
    – is the test suite operation returning a value in all circumstances;
    – are error situations covered (empty input variables, etc.).
  6. State some evident examples.

E.2.5 Test suite operations must not use global data

All information required by test suite operations must be passed as formal parameters. This includes test suite variables, test case variables, test suite parameters, and constraints.

RULE 14: General aspects of specifying constraints

  1. Develop a design concept for the complete constraints part, particularly with respect to the "conflicting" features as indicated in items i) to iv) and including naming conventions (see ETR 141 [37] clause 6).
  2. Make extensive use of the different optional "Comment" fields in the constraint declaration tables to highlight the peculiarity of each constraint.

RULE 15: Relation between base constraints and modified constraints

  1. Define different base constraints for the send- and receive direction of a PDU (when applicable).
  2. Use modified constraints preferably when only a small number of fields or parameter values are altered with respect to a given base.

NOTE 1: For SEND events the creation of a further modified constraint can sometimes be avoided, if an assignment is made in the SEND statement line, thus overwriting a particular constraint value.

  1. Design the relation between base constraints and modified constraints always in connection with parameterization of constraints (see the two subsequent subclauses).

NOTE 2: Additional parameters in a constraint, introduced to avoid the declaration of further base/modified constraints can reduce the amount of constraints needed in an ATS, but then the constraint reference is getting more and more unreadable.

  1. When modified constraints are used, keep the length of the derivation path small. The length of the derivation path (resulting from the number of dots in it) is a kind of nesting level, and it is known from experience that a length greater than 2 is normally difficult to overview and maintain.

Modified constraints should not have a derivation path longer than 1. A modified constraint should not alter more than 5 values with respect to a given base constraint. If a constraint is used as a base constraint, it must have the prefix ‘cb’, to warn test suite maintainers / developers that any changes to this constraint may cause side effects.

Note that if an existing constraint without the ‘cb’ prefix is to be used as a base constraint, either a new, identical constraint with an ‘cb’ prefix must be created, or the existing constraint must be renamed to include the ‘cb’ prefix in all places it is referenced in the test suite.

RULE 16: Static and dynamic chaining

  1. Make a careful evaluation of which embedded PDUs are needed in ASPs/PDUs, in which (profile) environment the ATS may operate and which kind of parameterization for other parameters/fields is needed, to find an appropriate balance between the use of static and/or dynamic chaining in a particular ATS.
  2. When the ATS is used in different profile environments and the types and values of embedded PDUs cannot be predicted, dynamic chaining is normally the better choice.
  3. When static chaining is used, chose the name of the ASP/PDU constraint such that it reflects the peculiar value of the embedded PDU (see also the clause on naming conventions in ETR 141 [37]).

RULE 17: Parameterization of constraints

  1. Make a careful overall evaluation of which field/parameter values are needed in ASPs and PDUs to find an appropriate balance between the aim of a comparably small number of constraint declarations and readable and understandable constraint references.
  2. Keep the number of formal parameters small.
    Keep in mind, that the number of formal parameters in structured/ASN.1 types Constraints will add up to the total number of ASP/PDU constraints.
    A clear border for the number of formal parameters cannot be stated, but it is known from experience that a number bigger than 5 normally cannot be handled very well.

Constraints should not be passed more than five parameters. Instead, more constraints should be defined. Related parameters can be grouped in new structured types to reduce the number of parameters that must be passed to constraints.

NOTE 1: The value five has been selected based on the recommendation in ETR 141 [37] rule 17. If more parameters are required, we can update this rule, or use more than 5 parameters, and provide documentation indicating why more parameters are required.

A constraint should not be passed parameters to that are not processed in that constraint. If for example a parameter is to be passed from a PDU constraint to a structured type constraint then the PDU constraint should be made specific and not have that parameter passed. The reason for this is that no editors as yet can trace through this mechanism and it becomes very difficult in a complex suite to see exactly what is being passed.

For example:

PduA ::= SEQUENCE {

infoElement1 InformationElementType1,

infoElement2 INTEGER

}

InformationElementType1 ::= SEQUENCE {

field1 INTEGER,

field2 INTEGER

}

cb_PATypical( p_Field1: INTEGER; p_Field2: INTEGER ) ::= {

infoElement1 c_IET1Typical( p_Field1 ),

infoElement2 pField2

}

c_IET1Typical( p_Field1: INTEGER ) ::= {

field1 p_Field1,

field2 5

}

In the example constraint cb_PATypical, passing p_Field1 through to a nested constraint is not allowed, but the use of p_Field2 is acceptable.

RULE 18: Constraint values

  1. Use comments to highlight the peculiarity of the value, especially when the value is a literal, whose meaning is not apparent.
  2. Use test suite constants instead of literals, when appropriate.
    Normally not all literals can be defined as Test Suite Constants, but a rule by thumb is: if a literal value of a given type occurs more than once (as a constraint value or more generally in an expression), then it is useful to define it as a Test Suite Constant, letting the name reflect the value.
  3. Use the length attribute when possible and when the length is not implicit in the value itself or given by the type definition (e.g. for strings containing "*").

RULE 19: Verdict assignment in relation to the test body

Make sure that verdict assignment within a default tree is in relation to the test body. If an unsuccessful event arising in the test body is handled by the default tree, then assign a preliminary result "(FAIL)" within the corresponding behaviour line of the default tree. If the position of the unsuccessful event is not in the test body, assign a preliminary result "(INCONCLUSIVE)". If the behaviour line handling the unsuccessful event is a leaf of the default tree, assign a final verdict instead.

RULE 20: Test body entry marker

The entry of the test body should be marked.

RULE 21: State variable

For realizing test purposes dependent on protocol states, use a variable to reflect the current state of the IUT.

RULE 22: State checking event sequences

Combine event sequences used for checking a state of the IUT within test steps.

RULE 23: Easy adaptation of test steps to test cases

For easy adaptation of a test step to test case needs, parameterize the constraints used within a test step.

Test steps may be parameterized, but with no more than five parameters. See also ETR 141 [37] clause12.2 and rule 28. Related parameters can be grouped in new structured types to reduce the number of parameters that must be passed to constraints.

NOTE 2: Again, the value five has been selected based on the recommendation in ETR 141 [37] rule 17. If more parameters are required, we can update this rule, or use more than 5 parameters, and provide documentation indicating why more parameters are required.

RULE 24: Minimizing complexity of test steps

Minimize the complexity of test steps either by restricting the objective of a test step to atomic confirmed service primitives or by separating event sequences, which build different "logical" units into different test steps.

RULE 25: Nesting level of test steps

Keep the nesting level of test steps to a minimum.

RULE 26: Recursive tree attachment

Avoid recursive tree attachment. Where possible, use loops instead of recursive tree attachments.

RULE 27: Verdict assignment within test steps

If verdicts are assigned within a test step, guarantee at least the partial (i.e. not general) re-use of the test step.

RULE 28: Parameterized test steps

Use parameterized test steps to ensure re-use of test steps within test cases for different needs.

RULE 29: Combining statements in a sequence of alternatives

If there is no Boolean expression included in an alternative sequence, a statement of type UCS (unconditional statement) should never be followed by a statement of type UCS or CS (conditional statement) within a sequence of alternatives.

RULE 30: Using relational expressions as alternatives

  1. A relational expression should never restrict the value range of a preceding relational expression in the same alternative sequence using the same variable.
  2. The value range of a relational expression should be different from the whole value range of all preceding relational expressions in the same alternative sequence using the same variable.

RULE 31: Loop termination

Do not use conditions for terminating loops, which depend only on the behaviour of the IUT.

RULE 32: Avoiding deadlocks

  1. Make sure that each alternative sequence of receive events contains an OTHERWISE statement (without any qualifier) for each PCO.
  2. Make sure that each alternative sequence of receive events contains at least one TIMEOUT event (implying that a corresponding timer was started).

A set of alternatives using qualifiers shall always include an alternative containing the qualifier [ TRUE ], to provide a default behaviour if none of the qualifiers match.

For example:

[ tcv_Value = 1 ]

AM ! ASP_ForValue1

[ tcv_Value = 2 ]

AM ! ASP_ForValue2

[ TRUE ]

AM ! ASP_ForOtherValues

RULE 33: Straightforward specification of test cases

  1. Use only event sequences leading to the test body within a preamble.
  2. Handle all event sequences not leading to the test body within the default tree of the test case/step.
  3. If the very same event sequence can be used to transfer the IUT from each possible state to the idle state, then realize this event sequence as a postamble.

RULE 34: Test component configuration declaration

Avoid recursive test component configuration declarations.

RULE 35: Default trees with RETURN statement

Special care should be taken by using a RETURN statement within a default tree in order to avoid an endless loop resulting from the expansion of the default tree.