Menu

#67 EXPECT multiple responses

open
9
2005-06-22
2002-10-03
No

The test for the minimum concurrent COV subscriptions,
(test 9.6.1.X7), requires that the EXPECT statement be
expecting 5 responses, and the responses can come in
any order.

This is either requires 5 sequential EXPECT statements,
that can each expect any of the 5 responses, or some way
to construct an EXPECT statement that knows how to
handle up to 5 different responses.

In the case of test 9.6.1.X7, if less than 5 responses are
received, the script is supposed to FAIL. (ack!)

Test 9.6.1.X7 is described below:

9.6.1.X7 Ensuring 5 Concurrant COV Subscribers
Purpose: This test case verifies that the IUT can support 5
concurrent subscriptions.

Test Concept: Have the TD subscribe with 5 different
process identifiers, V1 through V5, and then check to
ensure that 5 notifications are sent when the monitored
object changes.

1. REPEAT (X=V1 to V5) DO {
TRANSMIT SubscribeCOV-Request,
'Subscriber Process Identifier' = X,
'Monitored Object Identifier' = (any
object supporting COV notifications),
'Issue Confirmed Notifications' =
FALSE,
'Lifetime' = (any valid value that will
allow the subscription to outlast the test)
RECEIVE BACnet-SimpleACK-PDU
WAIT Notification Fail Time
IF (if confirmed notifications were requested) THEN
RECEIVE ConfirmedCOVNotification-
Request,
'Subscriber Process
Identifier' = X,
'Initiating Device Identifier'
= IUT,
'Monitored Object
Identifier' = (the same object used in the
subscription),
'Time Remaining' = (any valid
value),
'List of Values' = (the initial
Present_Value and initial Status_Flags)
TRANSMIT BACnet-SimpleACK-PDU
ELSE
RECEIVE
UnconfirmedCOVNotification-Request,
'Subscriber Process
Identifier' = X,
'Initiating Device Identifier'
= IUT,
'Monitored Object
Identifier' = (the same object used in the
subscription),
'Time Remaining' = (any valid
value),
'List of Values' = (the initial
Present_Value and initial Status_Flags)
}
2. MAKE (Present_Value = any value that differs
from "initial Present_Value" such that a COV notification
would be generated)
3. REPEAT (X=V1 to V5) DO {
IF (if confirmed notifications were requested) THEN
RECEIVE ConfirmedCOVNotification-
Request,
'Subscriber Process
Identifier' = X,
'Initiating Device Identifier'
= IUT,
'Monitored Object
Identifier' = (the same object used in the
subscription),
‘Time Remaining' = (any valid value),
'List of Values' = (the new Present_Value
and Status_Flags)
TRANSMIT BACnet-SimpleACK-PDU
ELSE
RECEIVE UnconfirmedCOVNotification-Request,
'Subscriber Process Identifier' = X,
'Initiating Device Identifier' = IUT,
'Monitored Object Identifier' = (the same
object used in the subscription),
'Time Remaining' = (any valid
value),
'List of Values' = (the new
Present_Value and Status_Flags)
}

Passing Result: The notification in step 3 can be received
in any order by the TD.

Discussion

  • Michael S. Danner

    • priority: 5 --> 9
     
  • Mark Danner

    Mark Danner - 2002-12-10

    Logged In: YES
    user_id=590567

    Mike,

    Scripts support the chaining of EXPECT statements in either
    case fashion or with AND and OR combinations.

    Why wouldn't this case above, needing to receive 5
    responses in any order, simply be handled with 5 EXPECT
    statements ANDed together?

    EXPECT (
    ConfirmedCOVNotification-Request
    Subscriber Process = X
    ...
    )
    AND (
    ConfirmedCOVNotification-Request
    Subscriber Process = X
    ...
    )
    AND (
    ConfirmedCOVNotification-Request
    Subscriber Process = X
    ...
    )
    AND (
    ConfirmedCOVNotification-Request
    Subscriber Process = X
    ...
    )
    AND (
    ConfirmedCOVNotification-Request
    Subscriber Process = X
    ...
    )

    This is pretty basic, but it will fail if any one of them is not
    received. The current implementation is order dependant but
    that can be modified to any order in an AND chain. Would
    that satisfy this item?

     
  • ltribble

    ltribble - 2005-06-22
    • labels: 348546 --> Scripting Enhancements
     

Log in to post a comment.

MongoDB Logo MongoDB