Testing and interop
OT Fabric tests its OPC UA implementation against six independent stacks rather than only against itself. opcua-interop packages the reference stacks as Docker images; go-opcua owns the test cases and the published compatibility claims. This page describes opcua-interop v0.17.0 and go-opcua v1.27.0.
Reference stacks
Section titled “Reference stacks”| Adapter | Language | Stack version | Notes |
|---|---|---|---|
| open62541 | C | open62541 v1.5.9, OpenSSL crypto backend, mDNS via mdnsd | ECC policies, reverse connect, LDS and mDNS, PubSub with MQTT and SKS, alarms, push management |
| Eclipse Milo | Java | Eclipse Milo v1.1.8 with milo-encoding-json and milo-encoding-xml |
No ECC policy, no ReverseHello, not a discovery server, no PubSub |
| async-opcua | Rust | async-opcua 0.19.0, pure Rust crypto | No ECC, no LDS, no PubSub; trusts exact certificates only |
UA-.NETStandard (dotnet) |
C# | OPC Foundation UA-.NETStandard 2.0.1 on .NET 10 | The reference implementation: PubSub (UDP, MQTT, chunks, discovery), opc.wss and opc.https in UA Binary and UA JSON, alarms with the 1.05 fixture, push management, event history |
| node-opcua | TypeScript | node-opcua 2.187.12 on Node.js 24 | Reverse connect, alarms, push management; no ECC, no node management served |
opcua-asyncio (asyncua) |
Python | opcua-asyncio 2.1.0 on CPython 3.14 | RSA policies only, no reverse connect, no PubSub; event history read only |
UA-.NETStandard GDS (dotnet-gds) |
C# | UA-.NETStandard 2.0.1 with Opc.Ua.Gds.Server and Opc.Ua.Gds.Client |
The reference Global Discovery Server and GDS pull client, in an image of its own |
The images are ghcr.io/otfabric/opcua-interop-<adapter>:<version> (open62541, milo, async-opcua, dotnet, node-opcua, asyncua and dotnet-gds), for linux/amd64 and linux/arm64. Tags are immutable, and go-opcua v1.31.0 pins all seven by digest to opcua-interop v0.19.0, the current release. Since v0.18.0 a run writes reports/results.json in the organisation’s interop-result-v1 format, and known deviations are reported as known, never as passes.
Each image has the same modes: server (start a server from a fixture), client (run one probe operation), test, validate-fixture and print-capabilities. An Eclipse Mosquitto broker, pinned by digest, carries the MQTT PubSub tests.
Using the reference servers as simulators
Section titled “Using the reference servers as simulators”The reference servers are a safe target for the library and for opcuactl. They build a deterministic address space from a shared fixture, so both stacks expose the same nodes.
-
Start a server. From a checkout of opcua-interop (needs Docker with BuildKit,
make,jq, andopenssl1.1 or later for certificates):Terminal window make run-open62541 # open62541 server on 127.0.0.1:4840make run-milo PORT=4841 # Eclipse Milo server on 127.0.0.1:4841make run-dotnet PORT=4843 # UA-.NETStandard servermake run-dotnet-gds PORT=4846 # UA-.NETStandard Global Discovery Server, with the gds fixture -
Probe it with the reference client.
Terminal window docker run --rm --network host \ghcr.io/otfabric/opcua-interop-open62541:latest \client read \--endpoint opc.tcp://localhost:4840/opcua-interop \--node 'nsu=urn:otfabric:opcua-interop:model;s=Scalar.Int32'On macOS with Docker Desktop, use
--add-host=host.docker.internal:host-gatewayandhost.docker.internalinstead of--network host. -
Point your own client at it, for example
opcuactl browse tree -e opc.tcp://localhost:4840/opcua-interop --depth 2.
The baseline fixture lives under Objects/Compatibility in namespace urn:otfabric:opcua-interop:model. Always reference nodes by that namespace URI; the index differs between stacks.
| Folder | Content |
|---|---|
| Scalars | One read/write variable per built-in type, with values chosen to expose encoding errors |
| Arrays | Empty, one-element, multi-element, String, ByteString, 2D matrix |
| Dynamic | Counter (Int64, 250 ms), Toggle (Boolean, 500 ms), Ramp (Double, 100 ms) |
| Access | Read-write, read-only, write-only |
| Methods | Add, Multiply, Echo, NoArguments, MultipleOutputs, Fail |
| Events | Events.Source emits a BaseEvent about every 2 s, Severity 500 |
| History | History.Temperature: 5 raw samples. History.Events: an event notifier with 5 seeded events, Severity 100 to 500, and History.ResetEvents to restore them (UA-.NETStandard server, asyncua read only) |
| Analog | Analog.Level, Analog.Setpoint: AnalogItemType with EURange 0..100, for deadband tests |
| Alarms | Alarms.InteropAlarm, an alarm condition for the Alarms and Conditions tests (open62541, UA-.NETStandard and node-opcua servers); on UA-.NETStandard also Alarms.ExtAlarm with the 1.05 states, a dialog and an alarm group |
| PubSub | Writable variables of every common type for published fields and TargetVariables |
The fixture user is test-user / test-password; users with the SecurityAdmin role may call push certificate management. A secured server needs --certificate, --private-key and --pki-dir; the fixture’s securityProfiles decide which secure endpoints are advertised.
Without opcua-interop, opcuactl serve is the quickest test server (see the opcuactl page), and the go-opcua repository has runnable servers in examples/server/node_server, map_server, NodeSet2_server and method_server, a PubSub server in examples/pubsub/server, and a Global Discovery Server in examples/gds-pull.
What each adapter supports
Section titled “What each adapter supports”Run print-capabilities to see the client operations, client and server features, security profiles and codec support of an image:
docker run --rm ghcr.io/otfabric/opcua-interop-open62541:latest print-capabilitiesdocker run --rm ghcr.io/otfabric/opcua-interop-dotnet:latest print-capabilities| Feature (v0.19.0) | open62541 | Milo | async-opcua | UA-.NETStandard | node-opcua | asyncua |
|---|---|---|---|---|---|---|
| DataChangeFilter, client and server | Yes | Yes | Yes | Yes | Yes | Client only |
| Reverse connect | Yes | No | Yes | Not wired | Yes | No |
| ECC security policies | Yes | No | No | No (refuses the test PKI’s ECC certificates) | No | No |
| LDS server, mDNS | Yes | No | No | No | No | No |
| Node management served | Yes | No | Yes | Yes | No | Admin role only |
| Alarms and Conditions server fixture | Yes | No | No | Yes | Yes | No |
| Push certificate management server | Yes | No | No | Yes | Yes | No |
opc.wss and opc.https |
No | No | No | Yes, UA Binary and UA JSON (server) | No | No |
| Event history server | No | No | No | Read and update | No (variables only) | Read only |
| Push management and GDS pull clients | Yes | Yes | Yes | Yes | Push only | Yes |
| Query client | No | No | Yes | No | Yes | No |
| PubSub | UDP, MQTT, SKS, information model | No | No | UDP, MQTT, chunks, discovery | No | No |
codec JSON / XML |
Compact / partial | Compact and verbose / yes | No | Compact and verbose / yes | No | No |
The client mode has operations such as endpoints, read, write, browse, call, subscribe, event-subscribe, alarms, history-read, history-read-events, history-update-events, republish, transfer-subscriptions, node-management, register-server and codec, plus push on every adapter, gds-pull on every adapter but node-opcua, query on node-opcua and async-opcua, and pubsub-discover on UA-.NETStandard. All write JSON to stdout. --channel-lifetime-ms requests a short SecureChannel lifetime to force token renewals during a command.
Running the go-opcua interop suite
Section titled “Running the go-opcua interop suite”The suite lives in go-opcua’s interop/ directory behind the interop build tag. Tests start and stop the containers themselves; no pre-running containers or manual steps are needed.
# Test PKI for the security, ECC and secured reverse connect tests(cd ../opcua-interop && certs/generate.sh)export OPCUA_INTEROP_PKI_DIR=$PWD/../opcua-interop/certs/test-pki
make interop
# Release verification: fail instead of skip on any missing capabilityOPCUA_INTEROP_REQUIRE_CAPABILITIES=1 make interopcd ../opcua-interop && make image-open62541 image-dotnetcd ../go-opcuaOPEN62541_IMAGE=ghcr.io/otfabric/opcua-interop-open62541:dev \DOTNET_IMAGE=ghcr.io/otfabric/opcua-interop-dotnet:dev \make interopThe mDNS tests create a user-defined Docker bridge network and cross-compile a go-opcua discovery server into a container, so the daemon must allow bridge networks and Go must be able to build for GOOS=linux with CGO_ENABLED=0. A go-opcua server in a container must be published on the same port it listens on.
Every capability is tested in both directions per peer: the go-opcua client against the peer’s server, and the peer’s client against the go-opcua server. A row is marked verified only when a named peer test ran against the pinned images without skipping; Go-to-Go tests never earn a verified mark. Every row a peer cannot pass carries its reason: the peer lacks the feature, deviates from the specification, or the adapter does not offer the command yet.
| Peer | Verified | Unverified | Unsupported by the peer | Deferred |
|---|---|---|---|---|
| open62541 and Eclipse Milo | 521 | 0 | 281 | 52 |
| async-opcua | 172 | 0 | 231 | 24 |
| UA-.NETStandard | 261 | 4 | 134 | 28 |
| node-opcua | 178 | 4 | 223 | 22 |
| opcua-asyncio | 148 | 0 | 251 | 28 |
That is 1280 verified rows, and 8 left unverified, all waiting for an adapter command. The counts come from the ledgers in go-opcua’s interop/ directory (COVERAGE.md and testdata/ledger-*.json).
What has been validated
Section titled “What has been validated”Verified with every peer that has the feature, in both directions, among others:
- Reads of every built-in scalar type, arrays and matrices, batch reads, IndexRange, TimestampsToReturn, write and read-back, access-level rejections.
- Browse, BrowseNext, TranslateBrowsePaths, RegisterNodes; method calls with argument validation and Bad results.
- Subscriptions: queue windows, timestamps, publishing and monitoring modes, DataChangeFilter deadbands and triggers, Republish and TransferSubscriptions, recovery after a reconnect.
- Security: the RSA policies in Sign and SignAndEncrypt, trusted and untrusted certificates, valid and invalid usernames, SecureChannel renewal under a live subscription, multi-chunk secured messages.
- Event subscription with OfType and severity filters; raw HistoryRead and continuation points; LDS registration and FindServers.
- Historical events: all six peer clients read the go-opcua server’s event history forward and in reverse, page it with continuation points, filter it by type and severity, and insert, replace, update and delete events. The go-opcua client does the same against the UA-.NETStandard server, and reads the asyncua server with its deviations pinned.
- Alarms and Conditions: ConditionRefresh, Acknowledge, Confirm and AddComment in both directions with open62541, UA-.NETStandard and node-opcua, and from every peer client against the go-opcua server; the OPC UA 1.05 methods, dialogs, branches, alarm groups, timing, metrics and audit events from all six peer clients.
- Certificate management: the push model against open62541, UA-.NETStandard and node-opcua servers, and the 1.05 additions against UA-.NETStandard; every peer’s push client against the go-opcua server, with the 1.05 flags; the GDS pull model in both directions against the UA-.NETStandard Global Discovery Server, and from open62541, Milo, async-opcua, asyncua and UA-.NETStandard clients against the go-opcua GDS. Session signatures with a server that sends its certificate chain, as UA-.NETStandard does by default.
- Transports:
opc.httpsandopc.wssagainst UA-.NETStandard, in UA Binary and, from the go-opcua client, in UA JSON (https-uajson,wss-uajson). No other peer implements the JSON mappings. - PubSub: with open62541, UADP and JSON codecs byte for byte, UDP unicast and multicast, Ethernet, MQTT 3.1.1 and 5.0 through Mosquitto, message security, the SKS (pull and push) and the PublishSubscribe methods; with UA-.NETStandard, UDP, MQTT, static-key security, chunked NetworkMessages and UADP discovery. AMQP 1.0 is tested go-opcua to go-opcua through RabbitMQ 4 and ActiveMQ Artemis.
- JSON and XML encodings of values with open62541, Milo and UA-.NETStandard.
With open62541 only, because no other peer has the feature: all ECC policies including Brainpool and Curve448 (the AEAD and Brainpool policies in SignAndEncrypt only), username tokens and renewal over ECC, reverse connect including secured channels (also with async-opcua and node-opcua), and mDNS discovery.
Interop found go-opcua defects that Go-to-Go tests could not: the RSA-OAEP-SHA256 block size (UA-.NETStandard), the first sequence number of a channel (async-opcua), the renewal of a superseded token (asyncua) and in-place key swaps on renewal (open62541, Milo). The peers’ own deviations, such as ignored TimestampsToReturn or writes with a SourceTimestamp accepted, are pinned by the tests and listed in go-opcua’s interop gaps.
Test your stack against OT Fabric’s
Section titled “Test your stack against OT Fabric’s”ghcr.io/otfabric/opcua-interop-otfabric is go-opcua behind the same container contract as the reference images (adapter name otfabric), so you can test your OPC UA client or server against it, the way OT Fabric tests its own stack against yours:
docker run -d --name go-opcua -p 127.0.0.1:4840:4840 ghcr.io/otfabric/opcua-interop-otfabric:<tag> \ server --fixture /fixtures/baseline/fixture.jsonuntil docker exec go-opcua test -f /run/opcua-interop/ready; do sleep 0.1; doneThe server builds the same baseline address space as the references, and client <operation> runs go-opcua’s client against your server. opcua-interop v0.19.0 added cases for what the image covers, run across every pair that declares the capability: history, alarms and events, ECC, X.509 user tokens, reverse connect, opc.https and opc.wss, codecs, certificate push and trust lists, GDS pull and PubSub. Against the v0.19.0 references, the v1.29.5 image passed 802 interop checks with 0 failures and 13 known deviations, and 117 PubSub checks. version prints the versions inside the image.
Its tags are go-opcua versions, such as v1.29.5, and latest; a rebuild of a version replaces its tag, so pin the digest when you need an exact build. It is not part of a opcua-interop release or its manifest.json, and it reports independentEngine: false: a result against it tells you about your stack, not something independent about OT Fabric’s. A result you publish, naming your implementation and version, is independent evidence. Like the references, it is for testing only and has no place on a network you do not control.
What has not been validated
Section titled “What has not been validated”- Deferred: NodeSet2 import, cross-stack custom DataTypes, IssuedIdentityToken, HistoryRead modified, at-time and processed and HistoryUpdate of values against peers, intermediate certificate chains and CRLs, custom event emission and the general WhereClause surface for peer clients, and secured LDS registration against a peer LDS.
- Waiting for an adapter: a GDS pull client for node-opcua, the PubSub reader state of the UA-.NETStandard adapter, and UA JSON in the UA-.NETStandard adapter’s client, which selects UA Binary endpoints only.
- ECC with other stacks: open62541 is the only ECC peer; UA-.NETStandard 2.0.1 refuses the test PKI’s ECC certificates. ECC
Signmode follows open62541 v1.5.9 and is not expected to interoperate with stacks that follow OPC UA 1.05.07. - Not certified by the OPC Foundation.
Other test layers
Section titled “Other test layers”| Layer | Command | What it covers |
|---|---|---|
| Unit and race tests | make test-norace, make test |
All packages; coverage gate of 90% on core packages |
| Conformance | part of go test ./... |
The go-opcua client against an in-process server, per area: address space, subscriptions, sessions, security, transports, history, alarms, certificate management, discovery and PubSub; fails when an exported client method or option is exercised by none of them |
| Integration | make integration, make selfintegration |
Go client against a FreeOpcUa Python server, and against an in-process Go server |
| Chaos | make chaos |
Faults on unsecured and secured channels (bit flips, replayed, lost and reordered chunks), DataChangeFilter, reverse connect, discovery, codecs, certificate management, the GDS, and PubSub over lossy networks and failing brokers; seeds are logged for replay |
| Fuzzing | ua, uasc, uacp, PubSub and more |
Binary, JSON and XML decoders, secure channel, transport, WebSocket and HTTPS, certificates and PFX files, mDNS, and the UADP, JSON, MQTT, AMQP and Ethernet parsers |
opcuactl has end-to-end tests that run every command family against opcuactl serve and go-opcua test servers, with their output formats and exit codes, at 92.7% coverage. Its published example outputs were captured against a WAGO 750-8102 PFC100 PLC (anonymous and username over None/None only, no events or history) and against go-opcua demo servers and real MQTT and AMQP brokers for the ECC, reverse connect, discovery, encoding and PubSub features.