Subscription Client Modify

Allow modification of the Subscription configuration using the ModifySubscription Service. General Tests in the ModifySubscription Request Verify the request is valid and based on the end-user configuration: SubscriptionId matches the id of the intended subscription to modify. Check that RequestedPublishingInterval is not 0 (invalid value). RequestedLifetimeCount is at least 3x greater than RequestedMaxKeepAliveCount. Client logs any difference where the revised parameter differs from the requested parameter. General Client Behavior on ModifySubscription Client always checks the 3x multiplier on the LifetimeCount/MaxKeepAliveCount and reports an error if the rule is broken. If the Client cannot determine that the 3x multiplier for LifetimeCount/MaxKeepAliveCount then it deletes the subscription. SetPublishingMode General Checks: Validate request: SubscriptionIds are not null or empty. DeleteSubscription General Tests Verify that the requestHeader is valid. Verify the subscriptionIds array contains at least 1 subscriptionId.


Questions? Contact us
Generated: 22/11/2021 at 17:22:12 p.m.
Subscription Client Modify - 47 Test Cases
Test Case Id Test Type Keywords Test Case Description Test Requirements Expected Result

001

Lab ModifySubscription  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client writes a value and calls publish.
Client calls ModifySubscription with default parameters
Client writes a value and calls publish.
Client correctly receives and processes the response.
Verify that client honors the RevisedPublishingInterval.
Client receives a notification for each Publish call.

002

Lab ModifySubscription  Client creates a subscription with default values but PublishingEnabled= false and adds an active monitored item (static writeable value). This subscription is modified with default values.
Write the value.
Call Publish.
Client correctly receives and processes the response.
Verify Client can process a KeepAliveMessage.

003

Lab ModifySubscription  Client creates 3 subscriptions using Default values.
Client modifies the 1st subscription using Default values.
Let Client run through 3 Publishing cycles.
Verify that the right SubscriptionId is specified.
Verify the 1st subscription was modified by observing the RevisedPublishingInterval is honored accordingly.

004

Lab ModifySubscription  Client creates 3 subscriptions using Default values.
Client modifies the 2nd subscription using Default values.
Let Client run through 3 Publishing cycles.
Verify that the right SubscriptionId is specified.
Verify the 2nd subscription was modified by observing the RevisedPublishingInterval is honored accordingly.

005

Lab ModifySubscription  Client creates 3 subscriptions using Default values.
Client modifies the 3rd subscription using Default values.
Let Client run through 3 Publishing cycles.
Verify that the right SubscriptionId is specified.
Verify the 3rd subscription was modified by observing the RevisedPublishingInterval is honored accordingly.

006

Lab ModifySubscription  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client modifies the RequestedPublishingInterval value, e.g. to 10 seconds.
Verify that client honors the RevisedPublishingInterval.

007

Lab ModifySubscription  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client modifies the RequestedPublishingInterval to a value that will knowingly trigger a RevisedPublishingInterval, e.g. 333 msec.
Verify that client honors the RevisedPublishingInterval.

008

Lab ModifySubscription  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client modifies the RequestedPublishingInterval value, e.g. to 1msec.
Verify that client honors the RevisedPublishingInterval.

009

Lab ModifySubscription  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client modifies the RequestedPublishingInterval = 0.
Client handles the revised RequestedPublishingInterval and may log it.

010

Lab ModifySubscription  Client creates 5 subscriptions using Default values except for the RequestedPublishingInterval=10000.
In a sequence, the Client modifies the 5th, then 3rd, then 1st subscription with different values:





Parameter


5th


3rd


1st




Requested Publishing Interval


5000


666


1




Requested Lifetime
Count


300


50


3




Requested MaxKeepAlive Count


150


15


1




Max
Notifications PerPublish


Max Counter


50


1




Let the client run through 3 Publish cycles.
Verify that the right SubscriptionId is specified.
Verify the 5th subscription was modified by observing the RevisedPublishingInterval is honored accordingly.
Verify the 3rd subscription was modified by observing the RevisedPublishingInterval is honored accordingly.
Verify the 1st subscription was modified by observing the RevisedPublishingInterval is honored accordingly.

011

Lab ModifySubscription  Client modifies the subscription by multiplying the RevisedLifetimeCount value by 5
The RequestedMaxKeepAliveCount is at least 3x smaller than the RequestedLifetimeCount.

012

Lab ModifySubscription  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client modifies the RequestedMaxKeepAliveCount value, e.g. to 60.
Client also sends the correct (minimum of 3x) multiplier value for the RequestedLifetimeCount parameter.

013

Lab ModifySubscription  Client modifies the RequestedMaxKeepAliveCount value = 0
Client is handling the revised RequestedMaxKeepAliveCount.

014

CTT ModifySubscription  Client performs call with MaxNotificationsPerPublish = 3.
Client calls Publish.
Note: CTT script needed to inject notification messages into response.
Client able to process the Notifications in the Publish.

015

Lab ModifySubscription  Client modifies the priority value to 500.
Client logs the modification result.

016

Lab ModifySubscription  Client modifies the priority value to 1.
Client logs the modification result.

017

Lab ModifySubscription  Client modifies the priority value to 100.
Client logs the modification result.

018

Lab SetPublishingMode  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client writes a value.
Client calls Publish.
Client calls SetPublishingMode with PublishingEnabled=false.
Client writes a value and calls publish.
1st publish call yields a data change notification which the client will process.
2nd publish call does not yield a data change notification.

019

Lab SetPublishingMode  Client creates a subscription with default parameters and adds an active monitored item (static writeable value).
Client writes a value.
Client calls Publish.
Client calls SetPublishingMode with PublishingEnabled=true.
Client writes a value and calls publish.
Both Publish calls yield a data change which the client will process.

020

Lab SetPublishingMode  Client creates a subscription with default parameters but PublishingEnabled=false and adds an active MonitoredItem (static writeable).
Client calls SetPublishingMode with PublishingEnabled=true for this subscription.
Client writes a value and calls Publish.
1st publish call does not yield a data change notification.
2nd publish call yields a data change notification which the client will process.

021

Lab SetPublishingMode  Client creates a subscription with default parameters but PublishingEnabled=false and adds an active MonitoredItem (static writeable).
Client calls SetPublishingMode with PublishingEnabled=false for this subscription.
Client writes a value and calls Publish.
Neither Publish calls yield a data change so the client will process a keep alive response.

022

Lab SetPublishingMode  Monitor the use of the call to ensure that the Client is able to batch multiple requests into a single call.
Client creates multiple subscriptions with default parameters and calls PublishingEnabled= false for all of them.
Client enables/disables all subscriptions in a single call versus individually.

023

Lab SetPublishingMode  Client creates five subscription with default parameters but PublishingEnabled=false and adds an active MonitoredItem (static writeable) to each subscription.
Client calls SetPublishingMode with PublishingEnabled=true for all subscriptions.
Client writes every value and calls publish.
Client enables all subscriptions in a single call versus individually, if possible via a GUI.
Publish call yields a data change notification for each subscription.

024

Lab SetPublishingMode  Client creates five subscriptions with default parameters and adds an active monitored item (static writeable value) to each subscription.
Client writes to every value in every subscription.
Client calls Publish.
Client calls SetPublishingMode with PublishingEnabled=false for all subscriptions.
Client writes every value and calls publish.
1st publish call yields a data change notification for every value in every subscription.
2nd publish call does not yield a data change notification for any subscription.

025

SetPublishingMode  Client calls SetPublishingMode with empty SubscriptionIds array.
This should not be possible from a Client.

026

SetPublishingMode  Client is able to request variations of diagnostic info in the main RequestHeader.
Client checks the length of the diagnosticInfo == 0 OR == Results.length.
Client able to process and/or log/display the diagnostics received.

027

Lab DeleteSubscription  Client deletes one valid subscription that is Enabled.
In a single call.

028

Lab DeleteSubscription  Client deletes one valid subscription that is Disabled.
In a single call.

029

Lab DeleteSubscription  Client creates multiple subscriptions with default parameters.
Delete all subscriptions.
Verify that the deletion will be done in one single call.

030

Lab DeleteSubscription  End-user exits the application.
If the Client calls this method when exiting, or as part of a procedure for disconnecting from the server.)
The Client may not call DeleteSubscriptions if it uses the DeleteSubscriptions parameter in CloseSession.
If DeleteSubscriptions is called, then the request contains all subscriptionIds belonging to the session.

031

DeleteSubscription  Client calls deleteSubscriptions with some existing and some not existing subscription ids.
Client logs and/or displays error for the invalid subscription ids.

032

DeleteSubscription  Client calls deleteSubscriptions with empty request array.
The client does not make this call!

Err-001

CTT ModifySubscription  Inject the following error in Monitored subscription:
1.ServiceResult = Bad_SubscriptionIdInvalid
2.ServiceResult = Bad_InternalError
a.Client correctly receives and processes the response.
b.Client continues to use the subscription assuming it is in the same state as before the modifysubscription call was made.

Err-002

Randomly inject one of the following RevisedPublishingInterval codes. Repeat this test several times each tmie varying the result
1.Modify the PublishingInterval per the default parameter value.
ServiceResult = Good, RevisedPublishingInterval set to the CreateSubscription RevisedPublishingInterval value.
2.ServiceResult = Good, RevisedPublishingInterval set to the original request*2.
3.ServiceResult = Good, RevisedPublishingInterval set to the original request*20.
4.ServiceResult = Good, RevisedPublishingInterval is a NaN.
5. RevisedPublishingInterval returned decades smaller than the RequestedPublishingInterval, e.g. requested / 10 (or a reasonable difference).
a.Client uses the same/existing PublishingInterval value.
b,c.If the Client keeps the subscription then it honors the revised value.
d.If the Client keeps the subscription then it honors the revised value.
e.Client honors the revised value.

Err-003

CTT ModifySubscription  Randomly inject one of the following SRevisedLifetimeCount codes. Repeat this test several times each tmie varying the result
1. ServiceResult = Good, RevisedLifetimeCount is set to the previous value.
2. ServiceResult = Good, RevisedLifetimeCount is set to CreateSubscription RevisedLifetimeCount* 2.
3. ServiceResult = Good, RevisedLifetimeCount is set to CreateSubscription RevisedLifetimeCount * 20.
4.RevisedLifetimeCount returned decades smaller than RequestedLifetimeCount, e.g. requested / 10 (or a reasonable difference).
5.RevisedLifetimeCount is less than 3 times the RevisedMaxKeepAliveCount.
If the client uses this parameter to determine its Publish cycle, then the Client uses QueueSize on the MonitoredItems to make sure that it does not setup the potential for data-loss.

Err-004

CTT ModifySubscription  Randomly inject one of the following RevisedMaxKeepAliveCount codes. Repeat this test several times each tmie varying the result
1. ServiceResult = Good, RevisedMaxKeepAliveCount is set to the previous value.
2. ServiceResult = Good, RevisedMaxKeepAliveCount is set to CreateSubscription RevisedMaxKeepAliveCount * 2.
3.ServiceResult = Good, RevisedMaxKeepAliveCount is set to CreateSubscription RevisedMaxKeepAliveCount * 20.
4.RevisedMaxKeepAliveCount returned decades smaller than RequestedMaxKeepAliveCount, e.g. requested / 10 (or a reasonable difference).
If the client uses this parameter to determine its Publish cycle, then the Client uses QueueSize on the MonitoredItems to make sure that it does not setup the potential for data-loss.

Err-005

CTT ModifySubscription  Unavailable  Client creates a subscription with PublishingEnabled = false (default values for remaining parameters) and adds active MonitoredItem (static, writeable).
Modify subscription with default parameters.
Client writes a value.
Client calls publish.
Server reports a value change instead of KeepAlive.
Client logs and/or displays error as a value change is not expected because the subscription is inactive.
Client discards the data change.

Err-006

CTT ModifySubscription  Client performs call with MaxNotificationsPerPublish = 1.
Client calls Publish.
Note: CTT script needed to inject 2 or more notification messages into response.
Client reports a problem with the message it has received.
Client tries to process everything, and if it fails to process everything then a new SecureChannel should be established while revising its processing limits.

Err-007

CTT SetPublishingMode  Inject one of the following ServiceResult codes.
1. Bad_NothingToDo.
2. Bad_TooManyOperations.
a.Client correctly receives and processes the response.
b.Client represents the subscription(s) in the same state that they were before the call was made, e.g. if previously showing “active” on a subscription then the state will continue to show as “active”.

Err-008

CTT SetPublishingMode  Client modifies multiple subscriptions. The ServiceResult = Good. The first item is Bad_SubscriptionIdInvalid with the remaining results being Good.
Client logs and/or displays the error to the end-user.

Err-009

CTT SetPublishingMode  Client modifies multiple subscriptions. The ServiceResult = Good. All items are reported as Bad_SubscriptionIdInvalid.
Client logs and/or displays the errors to the end-user.

Err-010

CTT SetPublishingMode  Inject the following error codes:
1. Client modifies five subscriptions. The ServiceResult = Good. The 1st, 3rd and 5th item are reported as Bad_SubscriptionInvalid.
2.Client modifies five subscriptions. The ServiceResult = Good, but an empty array is returned.
a.Client logs and/or displays the errors to the end-user.
b.Client logs and/or displays an error to the end-user.
Client represents the subscription(s) in the same state that they were before the call was made, e.g. if previously showing “active” on a subscription then the state will continue to show as “active”.

Err-011

CTT SetPublishingMode  Unavailable  Inject one of the following ServiceResult codes.
1.diagnosticInfo length = Results.length – 1.
Note: test applies when >1 subscriptionId is specified in the SetPublishingMode call.
2.diagnosticInfo length = Results.length + 1.
3.diagnosticInfo results contain different types of diagnostic than the client requested.
Client reports an error to the end-user.
Client discards the diagnosticsInfo received.

Err-012

CTT DeleteSubscription  Inject the following ServiceResults codes
1. ServiceResult = Bad_NothingToDo
2. ServiceResult = Bad_TooManyOperations
Client logs and/or displays an error to the end-user.
Client assumes that no/zero subscriptions have been deleted.

Err-013

CTT DeleteSubscription  Inject the following error codes:
1. ServiceResult = Good, but first result=Bad_SubscriptionIdInvalid.
2.. ServiceResult = Good, but all results yield Bad_SubscriptionIdInvalid.
a.Although the call reports successful, the client should log and/or display an error to the end-user.
b.Client frees-up any subscription objects it has in its memory for any disconnected subscriptions.

Err-014

CTT DeleteSubscription  Inject the following code to increase and decrease the length of the result array
1.For a request including at least one subscription to delete:
ServiceResult = Good, but the length of the result array is increased by one.
2. For a request including at least one subscription to delete:
ServiceResult = Good, but the length of the result array is decreased by one.
a.Client logs and/or displays an error to the end-user.Client processes the results that it does receive, i.e. deletes the internal subscriptions objects for those subscriptions that were reported back as deleted successfully.
b.Client logs and/or displays an error to the end-user.
Client processes the results that it does receive, i.e. deletes the internal subscriptions objects for those subscriptions that were reported back as deleted successfully.
Client calls DeleteSubscription again passing in the missing SubscriptionId.

Err-015

CTT DeleteSubscription  Unavailable  Client deletes subscription but continues to receive notifications from the subscription.
Client logs and/or displays an error to the end-user.
Client is permitted to accept the first DataChange after deleting the subscription. But only the first!