test(ab): run the ab_server integration suites on both transports

This commit is contained in:
Joseph Doherty
2026-10-07 17:35:31 -04:00
parent 2171fc8ce3
commit 8c68694df1
8 changed files with 156 additions and 43 deletions
@@ -40,8 +40,10 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests.Emulate;
public sealed class AbCipEmulateAlmdTests
{
/// <summary>Verifies that real ALMD raise fires OnAlarmEvent through the driver projection.</summary>
[AbServerFact]
public async Task Real_ALMD_raise_fires_OnAlarmEvent_through_the_driver_projection()
/// <param name="transport">The transport stack the driver runs on.</param>
[AbServerTheory]
[MemberData(nameof(TransportMatrix.Transports), MemberType = typeof(TransportMatrix))]
public async Task Real_ALMD_raise_fires_OnAlarmEvent_through_the_driver_projection(AbCipTransport transport)
{
AbServerProfileGate.SkipUnless(AbServerProfileGate.Emulate);
@@ -73,9 +75,10 @@ public sealed class AbCipEmulateAlmdTests
TagPath: "SimulateAlarm",
DataType: AbCipDataType.Bool,
Writable: true)),
Transport = transport,
};
await using var drv = new AbCipDriver(options, driverInstanceId: "emulate-almd");
await using var drv = new AbCipDriver(options, driverInstanceId: $"emulate-almd-{transport}");
await drv.InitializeAsync("{}", TestContext.Current.CancellationToken);
var raised = new TaskCompletionSource<AlarmEventArgs>(TaskCreationOptions.RunContinuationsAsynchronously);
@@ -43,8 +43,10 @@ public sealed class AbCipEmulateNestedUdtTests
/// leaves addressable as dot-joined paths, proving the nested template-id threading
/// runs the production <c>@udt/{id}</c> CIP fetch against Emulate's firmware.
/// </summary>
[AbServerFact]
public async Task Nested_struct_member_discovered_and_expanded_via_template_id_fetch()
/// <param name="transport">The transport stack the driver runs on.</param>
[AbServerTheory]
[MemberData(nameof(TransportMatrix.Transports), MemberType = typeof(TransportMatrix))]
public async Task Nested_struct_member_discovered_and_expanded_via_template_id_fetch(AbCipTransport transport)
{
AbServerProfileGate.SkipUnless(AbServerProfileGate.Emulate);
@@ -58,9 +60,10 @@ public sealed class AbCipEmulateNestedUdtTests
Devices = [new AbCipDeviceOptions($"ab://{endpoint}/1,0")],
EnableControllerBrowse = true,
Timeout = TimeSpan.FromSeconds(10),
Transport = transport,
};
await using var drv = new AbCipDriver(options, driverInstanceId: "emulate-nested-udt-smoke");
await using var drv = new AbCipDriver(options, driverInstanceId: $"emulate-nested-udt-smoke-{transport}");
await drv.InitializeAsync("{}", TestContext.Current.CancellationToken);
// Drive controller discovery — the driver walks @tags, encounters MotorNested1
@@ -38,8 +38,10 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests.Emulate;
public sealed class AbCipEmulateUdtReadTests
{
/// <summary>Verifies that reading a whole UDT decodes each member at its template object offset.</summary>
[AbServerFact]
public async Task WholeUdt_read_decodes_each_member_at_its_Template_Object_offset()
/// <param name="transport">The transport stack the driver runs on.</param>
[AbServerTheory]
[MemberData(nameof(TransportMatrix.Transports), MemberType = typeof(TransportMatrix))]
public async Task WholeUdt_read_decodes_each_member_at_its_Template_Object_offset(AbCipTransport transport)
{
AbServerProfileGate.SkipUnless(AbServerProfileGate.Emulate);
@@ -63,9 +65,10 @@ public sealed class AbCipEmulateUdtReadTests
new AbCipStructureMember("Status", AbCipDataType.DInt),
])),
Timeout = TimeSpan.FromSeconds(5),
Transport = transport,
};
await using var drv = new AbCipDriver(options, driverInstanceId: "emulate-udt-smoke");
await using var drv = new AbCipDriver(options, driverInstanceId: $"emulate-udt-smoke-{transport}");
await drv.InitializeAsync("{}", TestContext.Current.CancellationToken);
// Whole-UDT read optimization from task #194: one libplctag read on the