OPC UA Interoperability Testing with OpcCmd

From OPC Labs Knowledge Base

This article is mainly for internal usage.

Session

CreateSession() over an insecure channel with UA TCP and SecurityPolicy =None
Example: uaClient read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointAllowedMessagedSecurity SecurityNone
CreateSession() over a secure channel with UA TCP and SecurityPolicy=Basic128Rsa15 where the key length is minimum 2048.
Example: uaClient read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointSecurityPolicyDisplayName Basic128Rsa15
ActivateSession() with user identity = username/password
Example: uaClient read opc.tcp://opcua.demo-this.com:58810/GlobalDiscoveryServer i=2255 --EndpointUser appadmin:demo
ActivateSession() with user identity = anonymous
Example: uaClient read //opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointAnonymous True
However, the anonymous identity is the default, and as such is used in other tests unless other identity is explicitly specified.
ActivateSession - change user in an existing session.
Not supported (by API).
Use CloseSession() to end session. If possible, verify that the following service calls to the session are rejected.
Example:
uaClient --!option AmbientOutput=[Boolean]True --ConnectionMonitoring
read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255
Then, keep pressing Enter until the ambient disconnection events are displayed.
Create and use multiple sessions.
Example:
!option AmbientOutput [Boolean]True
uaClient --ConnectionMonitoring
getService uaClientConnectionControl lockConnection //opcua.demo-this.com:51210/UA/SampleServer
\uaClient --ConnectionMonitoring read //opcua.demo-this.com:51210/UA/SampleServer i=2255
CreateSession() with an application instance certificate
Example: uaClient read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointAllowedMessagedSecurity Secure
CreateSession() over a secure channel with HTTPS and SecurityPolicy =None.
Example: uaClient read https://opcua.demo-this.com:51212/UA/SampleServer i=2255 --EndpointAllowedMessagedSecurity SecurityNone
ActivateSession() with user identity = X509 certificate
Example: uaClient read //opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointCertificateFileName MyCertificate.pfx
CreateSession() over a secure channel with UA TCP and SecurityPolicy=Basic256Sha256
Example: uaClient read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointSecurityPolicyDisplayName Basic256Sha256
CreateSession() over a secure channel with UA TCP and SecurityPolicy=Aes128-Sha256-RsaOaep
Example: uaClient read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointSecurityPolicyDisplayName Aes128-Sha256-RsaOaep
CreateSession() over a secure channel with UA TCP and SecurityPolicy=Aes256-Sha256-RsaPss
Example: uaClient read opc.tcp://opcua.demo-this.com:51210/UA/SampleServer i=2255 --EndpointSecurityPolicyDisplayName Aes256-Sha256-RsaPss

View Services

Call Browse() on a single node in the address space. Repeat with other nodes.
(tbd)
Call Browse() by specifying more than one node in a single call. Walk through the address space.
Not supported (by OpcCmd).
Call Browse() using various Reference filters; e.g. only hierarchical references.
(tbd)
Call Browse() using various NodeClass filters (e.g. to return Variable nodes only).
(tbd)
Call Browse() with a filter to reduce the result information (e.g. omit BrowseName and ReferenceType).
(tbd)
[obsolete] BrowseNext (Continuation Point)
Not supported.
TranslateBrowsePathToNodeId to determine the NodeID of components (e.g. properties)
(tbd)
[obsolete] TranslateBrowsePathToNodeId for non-hierarchical References
Not supported.
Register()/UnregisterNodes() for one or more standard UA-defined Nodes (e.g. "Server") in a single call.
(tbd)
Register()/UnregisterNodes() for one or more vendor-defined Nodes in a single call.
(tbd)
Browse with Views.
Not supported (by API).

Attribute Services

Read() attributes - as supported by the Client - for a standard UA-defined node (e.g. "Server"). Repeat with other nodes.
(tbd)
Read() all supported attributes for a given vendor node in a single call. Vary the vendor nodes.
(tbd)
Read() all supported attributes on a given node while specifying a MaxAge value.
(tbd)
Read() the value attribute while specifying an encoding (not "default"). Vary the encoding.
(tbd)
Read() a value that is an array while varying the IndexRange to include specific indexes, the first X, the last X, the middle X. Vary the number of dimensions (e.g. "1:2,1:2" or "1:2,1:2,1:2" etc.) - if available.
(tbd)
Write() one or more Value attributes (WriteAccess permitted) for one or more nodes in a single call. Vary nodes.
(tbd)
Write() a value that is an array using the IndexRange to vary the number of elements, e.g. all, first X, last X, middle X. Repeat for multi-dimension arrays, if available.
(tbd)

Method Services

Call() a method defined by the vendor (not any of the OPC UA defined methods). Vary the methods to ensure different method signatures are covered, e.g. no parameters, in-parameters only, out-parameters only, in and out parameters etc.
(tbd)

Information Model

Browse() for standard folders: Objects, Types, ReferenceTypes, ObjectTypes, VariableTypes, DataTypes, and Views.
(tbd)
Browse() the Types folder and verify standard types are exposed, e.g. BaseObjectType, FolderType, Reference Types, Data Types (scalar types and standard structures).
(tbd)
Browse() the Server Object for ServerCapabilities, ServerDiagnostics, ServerStatus, VendorServerInfo, and any other standardized components.
(tbd)
Browse() the ServerDiagnostics.SessionDiagnosticsArray and verify the Client connection and its details can be read
(tbd)

Subscription Services

[obsolete] Create empty Subscription
Not supported (by API).
Modify an existing subscription by varying subscription properties (e.g. publishingInterval and keepAlive etc.) and verify subscription behavior.
Not supported (by OpcCmd).
Delete an existing Subscription
(tbd)
SetPublishingMode() to enable/disable publishing. Test with multiple subscriptions if available.
Not supported (by API).
[obsolete] Publish Service to request attribute value changes
Not supported (not clear).
Publish() returns after keep-alive interval (no data-changes; hint: subscribe to static items).
(tbd)
Issue multiple Publish() requests that are to be queued by the Server.
Not supported (by API).
[obsolete] Republish Service
Not supported (by API).
Create subscriptions with varying number of monitored items and different rate settings as supported by the client. Verify that the server provides updates according to the specified publishing rate. Optionally use Write() service to trigger data changes.
(tbd)

Redundancy

TransferSubscription() to change ownership of a subscription to another Client.
Not supported (by API).

Eventing

Subscribe to the Server Object's EventNotifier attribute. Specify some basic event fields in the select clause. Verify that events are notified.
(tbd)
Subscribe with a filter for EventType, Priority etc. Verify that events match the filter criteria.
(tbd)
[obsolete] Publish Service delivers event notifications matching the filter.
(tbd)
? (EventNodes_Browse)
(tbd)

Data Change

Add Monitored Items (value attribute of variables)
(tbd)
Modify the state of One or more monitored items in a single SetMonitoringMode() call, e.g. disabled, reporting, or sampling.
Not supported (by API).
[obsolete] Enable / disable publishing
Not supported (by API).
Create a trigger (SetTriggering()) to configure linked items. Verify that linked items are reported when the triggering item changes.
Not supported (by API).
Absolute Deadband filter.
(tbd)
Modify an existing trigger (SetTriggering()) by adding/removing items to/from the trigger. Verify behavior.
Not supported (by API).

Node Management

Add one or more nodes in a single AddNodes() call. Verify address-space for changes.
Not supported (by API).
Delete one or more nodes in a single DeleteNodes() call. Verify address-space for changes.
Not supported (by API).
Add one or more references in a single AddReferences() call. Verify address-space for changes.
Not supported (by API).
Delete one or more references in a single DeleteReferences() call. Verify address-space for changes.
Not supported (by API).

Alarm and Condition

Browse() the Types folder for supported Alarm types and Condition types.
(tbd)
Call CreateMonitoredItems() for an Event Notifier. Specify event fields to be returned. Specify a simple filter (e.g. if (Severity > 400)). Vary the selection and the filter.
(tbd)
[obsolete] Publish service delivers Alarm and Condition events
(tbd)
Call ConditionRefresh for a subscription while at least one Condition is in an interesting state (e.g. an Alarm is active). Verify that this Condition state is reported.
(tbd)
Modify the state of a Condition by calling the Enable/Disable methods. Verify the reporting behaviour.
(tbd)
Call the Acknowledge Method for an Alarm that requires acknowledgement.
(tbd)
Call the Confirm Method for an Alarm that requires confirmation.
(tbd)
[obsolete] Dialog Condition including Respond Method
(tbd)

Historical Access

Discovery

Challenge