Addressing Phones Compound Steps¶
A Compound Step begins by addressing a phone. The phone type (such as Android
) can be addressed subsequently as a Step Detail.
Note: Certain Steps are incompatible with each other. If Incompatible Step Details are used, an exception will be printed to the log.
Important! When using Step Details, a colon (:
) must be placed after the phone's name or the call's variable is declared. For example Given a phone as A:
.
Address the Phone ¶
The Step Details which address specific phones can contain more than one definition of type
, criterion
or profile
.
Syntax
1 | Given a phone as <name Identifier>: |
Parameter
- name - The name assigned to the phone
Example
1 2 3 4 5 | Given phones as A and B: * of type Android And A starts a call to B as MYCALL: ... |
Address the Phone Without Step Details¶
The address phones Step can be used without details. In this case, the colon must be omitted, otherwise the Step will fail.
Example
1 2 3 4 | Given phones as A and B And A starts a call to B as MYCALL: ... |
Phone Type ¶
The type
command addresses a specific phone type.
Syntax
1 | * of type <phoneType Identifier> |
Parameter
- phoneType - May be one of
Android
,Snom
,iOS
orAny
- Default is set to
Any
- iOS Phones may only be used with Macintosh computers that have Xcode installed
- They can only be used for Apptests
- Default is set to
Example
1 2 | Given a phone as A: * of type Android |
Phone Criterion ¶
The where
command addresses phones based on a criterion such as its phone properties or subscriber properties. If multiple where
Step Details are used within the same compound Step, their clauses will be joined with logical ANDs into a single selection criterion to be used for the phone acquisition.
Syntax
1 | * where <criterion Expression> <operator Operator> <value String> |
Parameters
-
criterion - The criterion that the phone selection is based on, which is an expression
- Default
httpPort
is configured to8080
- For example, phone properties (such as phone number, MSISDN or serial number ) or subscriber properties
- A full list of available properties can be accessed at
localhost:<httpPort Number>/phones
when intaQt is running
- Default
-
operator - A comparison operator or logical operator used to compare the criterion against its value
- For example,
==
for equal or!=
for not equal
- For example,
-
value - The selection criterion, such as the assigned phone's telephone number or network operator
Step Criterion Example
1 2 3 | Given a phone as A: * of type Android * where operator == "Operator1" |
In the example above, a phone of type Android
that matches the given operator will be selected if available.
Multiple Criteria Example
1 2 3 4 | Given a phone as A: * of type Android * where serialNumber == "abcde123456" * where network == "2G" |
In the example above, a phone of type Android
that matches both the given serial number and network registration will be selected if available.
Phone Profiles ¶
Phones can be addressed by their configured profiles.
Syntax
1 | * with profile <profileName Identifier> |
Parameter
- profileName - The name assigned to the profile in its configuration
Example
1 2 | Given a phone as A: * with profile profileA |
Allocation of Multiple Phones ¶
In addition to a single identifier, intaQt recognizes multiple phone identifiers separated by commas or the keyword and
.
Syntax
1 | phones as <name01 Identifier> [, or and] ... [, or and] <nameN Identifier> |
Parameter
- nameN - A unique name assigned to each phone
The following example allocates three phones, A
, B
and C
. Note that in this case, there is no trailing colon at the end of the line.
Example
1 | Given phones as A, B and C: |
Allocation of Multiple Phones and their Phone Type¶
Multiple phones can be allocated based on their phone type using the following compound Step:
Syntax
1 2 | phones as <phoneType01 Identifier> [, or and] ... [, or and] <phoneTypeN Identifier>: * of type <phoneType Identifier> |
Parameters
-
nameN - A unique name assigned to each phone
-
phoneType - Can be one of
Android
,Snom
orAny
- Default is set to
Any
- Default is set to
Example
1 2 | Given phones as A and B, C, D, E and F: * of type Snom |