This project has been deprecated in favor of
php-opcua/uanetstandard-test-suite, a complete rewrite based on the OPC Foundation UA-.NETStandard reference implementation.Why? UA-.NETStandard is maintained directly by the OPC Foundation — the organization that defines the OPC UA specification. This makes it the de facto standard: protocol behavior, binary encoding, and security are as close to the spec as possible. Testing against the reference implementation gives you higher confidence in real-world interoperability than testing against a third-party stack.
The new suite is a drop-in replacement — same ports, same endpoints, same address space, same users, same certificate layout. See the Migration Guide for details.
This repository will no longer receive updates. All new features and fixes will be in
uanetstandard-test-suite.We apologize for any inconvenience. The migration is straightforward — the new suite is a drop-in replacement and most test code requires no changes.
A comprehensive, ready-to-use OPC UA suite built specifically for integration testing of OPC UA client libraries. It provides 8 pre-configured server instances covering every major security policy, authentication method, and communication mode defined by the OPC UA specification.
Whether you're building an OPC UA client in Rust, C#, Python, Go, Java, or any other language, this suite gives you a realistic test environment with ~270 nodes, 12 callable methods, dynamic variables, events, alarms, historical data, structured objects, and custom extension objects — all running with a single docker compose up.
| Port | Server | What it tests |
|---|---|---|
| 4840 | No Security | Basic connectivity, anonymous access |
| 4841 | Username/Password | Encrypted channel + credential authentication |
| 4842 | Certificate Auth | X.509 certificate-based authentication |
| 4843 | All Security | Every policy, every mode, every auth method |
| 4844 | Discovery | OPC UA Discovery Server (FindServers) |
| 4845 | Auto-Accept | Encrypted with auto-trust for any client cert |
| 4846 | Sign Only | Message signing without encryption |
| 4847 | Legacy Security | Deprecated policies (Basic128Rsa15, Basic256) |
All servers share the same rich address space:
- 21 scalar data types (Boolean through LocalizedText) in read/write and read-only variants
- 20 array types + 14 empty arrays + 6 read-only arrays
- 3 multi-dimensional matrices (2D and 3D)
- 12 methods — arithmetic, string ops, arrays, async, error handling, event generation
- 13 dynamic variables — counters, sine/sawtooth/triangle waves, random values, status cycling
- 3 custom event types with periodic emission
- 3 alarm types — ExclusiveLimit, NonExclusiveLimit, OffNormal
- 4 historical variables with HistoryRead support
- Structured objects with nesting up to 10 levels deep
- 50 access control variables covering every combination of type and access level
- 4 OPC UA Views for filtered browsing
This suite covers the most common OPC UA testing scenarios out of the box, but every industrial environment is different. Need to simulate a SCADA system with hundreds of registers? An HVAC controller with multi-zone temperature loops? A fleet of PLCs on a factory floor? A smart energy meter with real-time power readings?
Fork this repository and build exactly the OPC UA environment you need.
The codebase was designed from the ground up to be extended. Each feature — methods, events, alarms, historical data, structures — lives in its own independent module under src/address-space/. You can modify any of them, remove the ones you don't need, or add entirely new modules without touching the rest. Adding a new variable is 10 lines of code. Adding a whole new address space section is a single file and two lines of wiring.
The Customization Guide walks you through everything step by step:
- Adding variables, methods, events, alarms, and historical nodes
- Creating new address space modules from scratch
- Adding new server instances with custom configurations
- Complete simulation examples (PLC, HVAC, energy meter, device network)
If you build something useful on top of this, consider opening a PR or sharing your fork — the OPC UA community benefits from better testing tools.
If the default suite already covers what you need, you're good to go. Jump straight to the Quick Start below, check the full Documentation for every node, method, and alarm available, or head to the CI Integration Guide to plug it into your pipeline in one step.
docker compose up -dThat's it. Eight servers are now running on ports 4840–4847 with auto-generated certificates.
# Connect to the simplest server
# Endpoint: opc.tcp://localhost:4840/UA/TestServer
# Stop everything
docker compose downThis repository is also a reusable GitHub Action. Add a single step to your workflow and all test servers are ready:
steps:
- uses: actions/checkout@v4
- uses: php-opcua/opcua-test-suite@v1.1.5
- run: cargo test # or npm test, pytest, dotnet test, etc.You can select which servers to start, set timeouts, and access the generated certificates:
- id: opcua
uses: php-opcua/opcua-test-suite@v1.1.5
with:
servers: 'no-security,userpass,certificate'
wait-timeout: '90'
- run: cargo test
env:
OPCUA_CERTS_DIR: ${{ steps.opcua.outputs.certs-dir }}For real-world usage examples, see the CI workflows in opcua-client, opcua-session-manager, and laravel-opcua.
For the full integration guide with all options, certificate usage, version pinning, and examples for other CI systems (GitLab, Jenkins), see docs/ci-integration.md.
Detailed documentation is available in the docs/ folder:
| Document | Description |
|---|---|
| Setup & Installation | Docker setup, environment variables, certificate regeneration |
| Server Instances | The 8 servers explained: when and why to use each one |
| Authentication & Roles | Users, passwords, roles, and permissions matrix |
| Security & Certificates | Policies, modes, certificate files, trust chain |
| Address Space Overview | Top-level structure and navigation |
| Data Types | All scalar types, arrays, matrices, and analog items |
| Methods | 12 methods with full signatures and testing checklist |
| Dynamic Variables | Time-varying variables and subscription testing |
| Events & Alarms | Custom event types, periodic events, alarm conditions |
| Historical Data | HistoryRead operations and historical variables |
| Structures | Nested objects, collections, deep nesting |
| Extension Objects | Custom structured types (TestPointXYZ, TestRangeStruct) |
| Access Control | Access levels, role-based folders, type/access combinations |
| Views | 4 OPC UA views for filtered browsing |
| Testing Guide | Step-by-step test scenarios for every feature |
| CI Integration | GitHub Actions, GitLab CI, Docker Compose usage |
| Customization | How to fork and build your own OPC UA simulations |
| AI Reference | Single-file machine-readable reference for AI tools |
| Username | Password | Role |
|---|---|---|
admin |
admin123 |
Full access |
operator |
operator123 |
Read/write on operational variables |
viewer |
viewer123 |
Read-only |
test |
test |
Full access (convenience) |
For bug reports, feature requests, or questions, please open an issue on GitHub Issues.
This project was built in part with the assistance of Claude (Anthropic). The AI contributed to code generation, documentation writing, and architecture decisions. All outputs were reviewed and validated by the author. The AI Reference document was specifically designed to be consumed by AI coding assistants working with this project.
This project is licensed under the MIT License.