Skip to content
/ .. / .. /
Introduction





Voice Call Steps

The following Steps are used for writing Voice Call Test Cases. Certain steps may be Timed or Deferred.

Voice call steps must be preceded by steps or compound steps that address phones and assign them to the test case. For more information, refer to:

Dial the Number

This step specifies the party who makes the call and the party to whom the call is directed at.

Syntax

1
<callingParty Identifier> dials the number <calledParty Identifier>

Parameters

  • callingParty - The party dialing the phone number

  • calledParty - The party being called

Example

1
And A dials the number B.number

This step is eligible for:

  • Timed

  • Deferred

Detect an Incoming Call

After the caller has dialed the B-party's number, the callee must detect the incoming call within a certain amount of seconds.

Note: If the time limit in which the callee must detect a call is set to a short amount of seconds, it may result into a time exception error message.

Syntax

1
2
3
4
5
6
7
// One party detects an incoming call
within <time Number> <timeUnit TimeUnit>, <calledParty Identifier> detects an
    incoming call from <callingParty Identifier>
// Multiple parties detect an incoming call
within <time Number> seconds, <calledParty1 Identifier>, ...
    and <calledPartyN Identifier>, ... detect
    an incoming call from <callingParty Identifier>

Parameters

  • time - The number of time units

  • timeUnit - One of seconds or minutes

  • calledParty - The phone being called by the callingParty

  • callingParty - The phone dialing the calledParty

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Feature: Detect Multiple incoming calls
    Scenario: B, C and D detect incoming calls

    Given an Android phone as A
    Given an Android phone as B
    Given an Android phone as C
    Given an Android phone as D
    When A dials the number B.number
    And within 15 seconds, B, C and D detect an incoming call from A.number
    And after 3 seconds, B answers the incoming call and, within 10 seconds, C and D stop ringing
    And within 10 seconds, A connects
    Then verify A.isConnected()
    And verify B.isConnected()
    And verify !C.isConnected()
    And verify !D.isConnected()
    And after 10 seconds, A ends the call and, within 20 seconds, he and B disconnect

This step is eligible for:

  • Deferred

Detect No Incoming Calls

This step checks that no incoming calls are detected. It will fail if a call is detected within the specified time.

Syntax

1
within <time Number> <timeUnit TimeUnit>, <calledParty Identifier> detects no incoming calls

Parameters

  • time - The number of time units

  • timeUnit - One of seconds or minutes

  • calledParty - The phone being called by the callingParty

Example

1
And within 15 seconds, B detects no incoming calls

This step is eligible for:

  • Deferred

Detect an Incoming Call with Any Format

When incoming calls are checked for the originating phone number, the phone number format can be arbitrarily assigned by adding the .any suffix, meaning it can be local (0699...), international (+43699...) or international with leading zeros, int00, (0043699...).

Syntax

1
2
within <time Number> <timeUnit TimeUnit>, <calledParty Identifier> detects an
    incoming call from <callingParty Identifier>.any

Parameters

  • time - The number of time units

  • timeUnit - One of seconds or minutes

  • calledParty - The phone being called by the callingParty

  • callingParty - The phone dialing the calledParty

Example

1
2
3
4
5
6
7
8
Feature: Call using any format
  Scenario: A calls B, B checks with any format
    Given an Android phone as A
    And an Android phone as B
    And A dials the number B.number
    And within 20 seconds, B detects an incoming call from A.any
    And after 5 seconds, B answers the incoming call
    And after 6 seconds, B ends the call

Detect an Incoming Call Without Originating Number

This step checks for an incoming call without asserting the caller number. For example, if a call is originating from a blocked/hidden number.

Syntax Then within

Parameters

  • time - The number of seconds to wait for the detection of the incoming call

  • calledParty - The identifier of the phone on which to wait for the incoming call

Example

1
2
3
4
5
6
7
8
Feature: Call using any format
  Scenario: A calls B, B checks with any format
    Given an Android phone as A
    And an Android phone as B
    And A dials the number B.number
    Then within 40 seconds, B detects an incoming call
    And after 5 seconds, B answers the incoming call
    And after 6 seconds, B ends the call

Do Not Detect an Incoming Call from any Number Format.

This step verifies that no call from any number format is detected.

Syntax

1
2
within <time Number> <timeUnit TimeUnit>, <calledParty Identifier> does not
    detect an incoming call from <callingParty Identifier>.any

Parameters

  • time - The amount of time units

  • timeUnit - One of seconds or minutes

  • calledParty - The phone being called by the callingParty

  • callingParty - The phone dialing the phone number

Example

1
2
3
4
5
6
Feature: Call using any format
  Scenario: A calls B, B checks with any format
    Given an Android phone as A
    And an Android phone as B
    And A dials the number B.number
    And within 20 seconds, B does not detect an incoming call from A.any

Do Not Detect an Incoming Call from a Specific Party

This step verifies that no call from a specific party is detected.

Syntax

1
2
3
4
5
6
7
// Single callee
within <time Number> seconds, <calledParty Identifier> does not
    detect an incoming call from <callingParty Identifier>
// Multiple called parties
within <time Number> seconds, <calledParty1 Identifier>, ...
    and <calledPartyN Identifier>, ... do not
    detect an incoming call from <callingParty Identifier>

Parameters

  • time - The number of seconds to wait for the incoming call to not be detected

  • calledParty - The phone(s) expected to not detect the incoming call

  • callingParty - The phone dialing the phone number

Example

1
2
3
4
// Single callee
And within 15 seconds, B does not detect an incoming call from A.number
// Multiple called parties
And within 15 seconds, A and B do not detect an incoming call from A.number

Feature File Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Feature: Do not Detect Multiple incoming calls
    Scenario: B, C and D do not detect incoming calls
    Given an Android phone as A
    Given an Android phone as B
    Given an Android phone as C
    Given an Android phone as D
    When A dials the number B.number
    And within 10 seconds, A connects
    And within 15 seconds, B, C and D do not detect an incoming call from A.number
    And within 30 seconds, A disconnects

This step is eligible for:

  • Deferred

Answer the Incoming Call

In this Step, the callee answers the incoming call after it has been detected.

Syntax

1
<calledParty Identifier> answers the incoming call

Parameter

  • calledParty - The phone answering the incoming call

Example

1
And B answers the incoming call

This step is eligible for:

  • Timed

  • Deferred

Reject the Incoming Call

In this step, the callee rejects an incoming call.

Syntax

1
<calledParty identifier> rejects the incoming call

Parameter

  • calledParty - The phone rejecting the incoming call

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
Feature: Basic call

  Scenario: Phone call with reject

    Given an Android phone as A
       And an Android phone as B

     When A dials the number B.number
       And within 20 seconds, B detects an incoming call from A.number
       And after 5 seconds, B rejects the incoming call
       And within 15 seconds, A's call is rejected

     Then verify !A.isConnected()
     Then verify !B.isConnected()

This step is eligible for:

  • Timed

  • Deferred

Note: When the call is rejected, neither of the phones connect, although the callee must detect a call while in the ringing state. This step might be used when writing a call forwarding test case. For example, when B rejects the call, which is then forwarded to C. A and C will then be connected when C answers the forwarded call.

Confirm the Call is Rejected

This step indicates that the caller's call is rejected (not necessarily by the callee) and disconnected. This can be combined with rejects an incoming call to verify different behaviors.

Syntax

1
2
within <time Number> <timeUnit TimeUnit>, <callingParty Identifier>'s call is
    rejected

Parameters

  • time - The number time units

  • timeUnit - One of seconds or minutes

  • callingParty - The phone dialing the phone number

Example

1
And within 10 seconds, A's call is rejected

This step is eligible for:

  • deferred

Note: This step can not be used in a call forwarding test case, because it would result in a disconnected call.

Confirm Caller Connects

This step checks if the caller connects after the call has been answered.

Syntax

1
within <time Number> <timeUnit TimeUnit>, <callingParty Identifier> connects

Parameters

  • time - The number of time units

  • timeUnit - One of seconds or minutes

  • callingParty - The phone dialing the phone number

Example

1
And within 10 seconds, A connects

This step is eligible for:

  • Deferred

End the Call

This step ends the call.

Syntax

1
<name Identifier> ends the call

Parameter

  • name - The name assigned to the phone ending the call

Example

1
And A ends the call

This step is eligible for:

  • Timed

  • Deferred

End the Call and Disconnect

This step ends the call and disconnects.

Syntax

1
2
3
4
5
6
7
// One phone disconnects
<name Identifier> ends the call and, within <time Number> <timeUnit TimeUnit>,
    he disconnects
// Multiple parties disconnect
<endingParty Identifier> ends the call and, within <time Number>
    <timeUnit TimeUnit>, he, <disconnectingPartyN Identifier>, ...
    and <disconnectingPartyX Identifier> disconnect

Parameters

  • endingParty - The phone that ends the call

  • number - The number of time units

  • number - One of seconds or minutes

  • disconnectingParty - The additional parties disconnecting after the call has ended

Example

1
2
And A ends the call, and within 10 seconds, he disconnects
And B ends the call and, within 10 seconds, he, A and C disconnect

Disconnect Within a Specified Timeframe

This step checks if a party disconnects within a specific amount of time. A sufficient amount of time should be specified to ensure that the disconnect can happen. Otherwise the test case will fail.

Syntax

1
within <time Number> <timeUnit TimeUnit>, <name Identifier> disconnects

Parameters

  • time - The number of time units

  • timeUnit - One of seconds or minutes

  • name - The name assigned to the disconnecting phone

Example

1
And within 10 seconds, A disconnects

This step is eligible for:

  • Deferred

Hold the Call

This step holds the call. For example, to initiate a conference call.

Test cases using this step will fail under the following circumstances:

  • The phone does not have any active calls.

  • The phone has only a single call that is already held.

  • The phone has an active and a holding call.

Syntax

1
<name Identifier> holds the call

Parameter

  • name - The name assigned to the phone holding the call

Step Example

1
And A holds the call

Failing Scenario Example - One Active and One Held Call

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Given an Android phone as A
Given an Android phone as B
Given an Android phone as C

And A dials the number B.number
And within 30 seconds, B detects the incoming call from A.number
And after 2 seconds, B answers the incoming call

And A holds the call

And after 2 seconds, A dials the number C.number
And within 30 seconds, C detects the incoming call from A.number
And after 2 seconds, C answers the incoming call

And A holds the call

In the example above, the second And A holds the call will throw an exception. The step <phone Identifier> switches the active and holding call should be used instead.

This step is eligible for:

  • Timed

  • Deferred

Disconnect Holding Calls

This step disconnects holding calls.

Syntax

1
2
within <time Number> <timeUnit TimeUnit>, <name Identifier>'s holding call
    disconnects

Parameters

  • time - The number of time units

  • timeUnit - One of seconds or minutes

  • name - The name assigned to the phone with the holding call

Example

1
And within 10 seconds, A's holding call disconnects

This step is eligible for:

  • Deferred

Switch Between the Active and Holding Call

This step switches between an active and holding call.

Syntax

1
<name Identifier> switches the active and holding call

Parameter

  • name - The name assigned to the phone switching between the active and holding call

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Feature: holdAndToggle

  Scenario: HoldAndToggle

    Given an Android phone as A
      And an Android phone as B
      And an Android phone as C

    When A dials the number B.number
      And within 35 seconds, B detects an incoming call from A.number
      And after 1 seconds, B answers the incoming call
      And within 5 seconds, A connects
      And after 5 seconds, A holds the call
      And after 4 seconds, A dials the number C.number
      And within 35 seconds, C detects an incoming call from A.number
      And after 4 seconds, C answers the incoming call
      And after 10 seconds, A switches the active and holding call
      And after 10 seconds, A switches the active and holding call
      And after 10 seconds, A switches the active and holding call
      And after 25 seconds, A ends the call and, within 60 seconds, he
      and B disconnect
      And after 10 seconds, A ends the call and, within 60 seconds, he
      and C disconnect

    Then verify !A.isConnected()
      And verify !B.isConnected()
      And verify !C.isConnected()

This step is eligible for:

  • Timed

  • Deferred

Call Transfer

The call transfer step connects the two existing call legs, for example between B and C, while disconnecting the leg of the party that initiated the transfer. This must be preceded by the holding call step.

To use call transfer with Snom phones, refer to the Snom phones section.

Syntax

1
<name Identifier> makes a call transfer

Parameter

  • name - The name assigned to the phone making the call transfer

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Feature: Voice call transfer

  Scenario: Call transfer

    Given an Android phone as A
      And an Android phone as B
      And an Android phone as C

    When A dials the number B.number
      And within 25 seconds, B detects an incoming call from A.number
      And after 5 seconds, B answers the incoming call
      And within 15 seconds, A connects
      And after 10 seconds, B transfers the call to C.number
      And within 10 seconds, B disconnects
      And within 25 seconds, C detects an incoming call from A.number
      And after 4 seconds, C answers the incoming call
      And within 5 seconds, A connects
      And after 15 seconds, A ends the call and, within 25 seconds, he
      and C disconnect

    Then verify !A.isConnected()
    Then verify !B.isConnected()
    Then verify !C.isConnected()

This step is eligible for:

  • Timed

  • Deferred

Make a Conference Call

In this step, the caller initiates a conference call.

Syntax

1
<name Identifier> makes a conference call
Parameter

  • name - The name assigned to the phone making the conference call

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Feature: Conference call

  Scenario: ConferenceCall with 3 parties

    Given an Android phone as A
      And an Android phone as B
      And an Android phone as C

    When A dials the number B.number
      And within 22 seconds, B detects an incoming call from A.number
      And after 5 seconds, B answers the incoming call
      And within 10 seconds, A connects
      And after 3 seconds, A holds the call
      And after 5 seconds, A dials the number C.number
      And within 20 seconds, C detects an incoming call from A.number
      And after 5 seconds, C answers the incoming call
      And after 5 seconds, A makes a conference call
      And after 15 seconds, A ends the call and, within 25 seconds, he
      and B disconnect
      And within 20 seconds, C disconnects

    Then verify !C.isConnected()
      And verify !B.isConnected()
      And verify !A.isConnected()
This step is eligible for:

  • Timed

  • Deferred

Stop Ringing

This step expects one or multiple phones to stop ringing within a timeout period. The phones must be ringing when the step is called.

Syntax

1
2
3
4
5
// Single phone stops ringing
And within <timeout Number> seconds, <phone Identifier> stops ringing
// Multiple phones stop ringing.
And within <timeout Number> seconds, <phone1 Identifier>, ... and <phoneN Identifier>
    stop ringing

Parameters

  • timeout - The number of seconds

  • phone - The phone(s) to stop ringing

Example

1
2
3
And within 30 seconds, A stops ringing
And within 30 seconds, A and B stop ringing
And within 30 seconds, A, B, C and D stop ringing

This step is eligible for:

  • Timed

  • Deferred

Stop Ringing After Call Answered

The following step is a variant of the stop ringing step. It verifies that all other phones stop ringing when the first one picks up the call.

Syntax

1
2
3
4
5
6
7
// Single phone stops ringing after call is answered
<calledParty Identifier> answers the incoming call and, within <time Number>
    <timeUnit TimeUnit>, <phone Identifier> stops ringing
// Multiple phones stops ringing after call is answered
<calledParty Identifier> answers the incoming call and, within <time Number>
    <timeUnit TimeUnit>, he <phone1 Identifier>, ... and <phoneN Identifier>
    stop ringing

Parameters

  • calledParty - The phone that answers the call

  • time - The amount of time units

  • timeUnit - One of seconds or minutes

  • phone - The other parties whose phones stop ringing

Example

1
2
3
And B answers the incoming call and, within 10 seconds, C stops ringing
And A answers the incoming call and, within 10 seconds, B and C stop ringing
And C answers the incoming call and, within 10 seconds, A, B and D stop ringing

This step is eligible for:

  • Timed

  • Deferred

Switch Call Waiting On

This step activates call waiting.

Syntax

1
And <name Identifier> switches call waiting on

Parameter

  • name - The name assigned to the phone switching call waiting on

Example

1
And A switches call waiting on

Switch Call Waiting Off

This step deactivates call waiting.

Syntax

1
And <name Identifier> switches call waiting off

Parameter

  • name - The name assigned to the phone switching call waiting off

Example

1
And A switches call waiting off

This step is eligible for:

  • Timed

  • Deferred

Call Forwarding Steps

Four types of call forwarding steps can be set and removed with the following steps. These involve setting and removing call forwarding that is one of: unconditional, busy, unreachable or unanswered.

Every call forwarding step is eligible for:

  • Timed

  • Deferred

To activate call forwarding with Snom phones, refer to the Snom Phones section.

Set Call Forwarding Unconditional

This step allows sets call forwarding unconditional, which means that every call will be forwarded.

Syntax

1
2
And <callingParty Identifier> sets call forwarding unconditional to
    <forwardedParty PhoneNumber>

Parameters

  • callingParty - The phone setting call forwarding

  • forwardedParty - The phone number the call is being forwarded it

Example

1
And A sets call forwarding unconditional to "+44123456789"

Remove Call Forwarding Unconditional

This step removes call forwarding unconditional.

Syntax

1
And <name Identifier> removes call forwarding unconditional

Parameter

  • name - The name assigned to the party removing call forwarding unconditional

Example

1
And A removes call forwarding unconditional

Set Call Forwarding Busy

This step sets call forwarding busy to the given phone number. If the callee is busy with another call, call forwarding will be activated.

Syntax

1
2
<callingParty Identifier> sets call forwarding busy to
    <forwardedParty Identifier>

Parameters

  • callingParty - The phone setting call forwarding

  • forwardedParty - The phone number the call is being forwarded to if the callee is busy

Example

1
And A sets call forwarding busy to "+44123456789"

Remove Call Forwarding Busy

This step removes call forwarding busy.

Syntax

1
<name Identifier> removes call forwarding busy

Parameter

  • name - The named assigned to the party removing call forwarding busy

Example

1
And A removes call forwarding busy

Set Call Forwarding Unanswered

This step sets call forwarding unanswered to the given phone number. If the callee does not answer the call, call forwarding will be activated.

Syntax

1
2
<callingParty Identifier> sets call forwarding unanswered to
    <forwardedParty Identifier>

Parameters

  • callingParty - The phone setting call forwarding

  • forwardedParty - The phone number the call is being forwarded to if the callee does not answer

Example

1
And A sets call forwarding unanswered to "+44123456789"

Remove Call Forwarding Unanswered

This step removes call forwarding unanswered.

Syntax

1
<name Identifier> removes call forwarding unanswered

Parameter

  • name - The name assigned to the party removing call forwarding unanswered

Example

1
And A removes call forwarding unanswered

Set Call Forwarding Unreachable

This step sets call forwarding unreachable to the given number. If the callee can not be reached, call forwarding will be activated.

Syntax

1
2
<callingParty Identifier> sets call forwarding unreachable to
    <forwardedParty Identifier>

Parameters

  • callingParty - The phone setting call forwarding

  • forwardedParty - The phone number the call is being forwarded to if the callee does not answer

Example

1
And A sets call forwarding unreachable to "+44123456789"

Remove Call Forwarding Unreachable

This step removes call forwarding unreachable.

Syntax

1
<name Identifier> removes call forwarding unreachable

Parameter

  • name - The name assigned to the party removing call forwarding unreachable

Example

1
And A removes call forwarding unreachable

Remove All Call Forwarding

This step removes all types of call forwarding (Unconditional, Busy, Unanswered, Unreachable).

Syntax

1
<name Identifier> removes all call forwardings

Parameter

  • name - The name assigned to the party removing all call forwardings

Example

1
And A removes all call forwardings

Release All Phones

This step releases acquired phones during execution so that the phones can be acquired by other test cases. During the release:

  • A snapshot of the phones will be kept within the context, which will contain all properties the phones had at the moment of their release.

  • The phones will still be accessible under the same identifiers after releasing them, but they will be just "stubs", without any functionality (for example, call other phones) except their properties.

Syntax

1
2
3
4
// Releases specified phones acquired during the test
Then release <name1 Identifier>, <name2 Identifier>, ... <nameN Identifier>
// Releases all phones acquired during the test.
Then release all phones

Parameter

  • nameX - The name assigned to the phone being released

Example

1
2
3
4
5
Then release A
Then release A, B
Then release A and B
Then release A, B and C
Then release all phones

DTMF Steps

These Steps set DTMF tones. These are used in cases, such as navigating through an automated voice menu. For more complex cases, the Telephony Built-ins - DTMF method may be used instead.

Syntax

1
<name Identifier> sends <tone String> as dtmf

Parameters

  • name - The name assigned to the phone setting its DTMF tone

  • tone - The key representing the corresponding tone

    • This can also be a context variable, such as a Context Object or Subscriber Property

Example

1
2
3
And A sends "1" as dtmf
And after 5 seconds, A sends fcLanguage as dtmf
And A sends B.mbPin as dtmf

This Step is eligible for:

  • Timed