# Maintaining DUT connection across different test plans

**URL:** <https://forum.opentap.io/t/maintaining-dut-connection-across-different-test-plans/2710>\
**Category:** General\
**Created:** [October 6, 2026, 3:42pm UTC](https://forum.opentap.io/t/maintaining-dut-connection-across-different-test-plans/2710 "2026-10-06T15:42:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuancai](https://avatars.discourse-cdn.com/v4/letter/y/cdc98d/32.png) [@yuancai](https://forum.opentap.io/u/yuancai)\
**Post date:** [October 6, 2026, 3:42pm UTC](https://forum.opentap.io/t/maintaining-dut-connection-across-different-test-plans/2710/1 "2026-10-06T15:42:08Z")

</div>

Hi there,

I’m building a tool that performs diagnostics on DUTs. The tool first establishes a connection to the DUT, then a workflow is selected from a list to be performed on the DUT. A workflow can do things like update the DUT firmware or reprogram the DUT. Each workflow is created as a separate test plan. During a DUT diagnostic session, several workflows can be done to reconfigure the DUT.

Here’s where it gets tricky: I want the DUT connection to be established in the beginning and maintained for the subsequent execution of different workflows’ test plans. Each DUT connection takes 5-10 seconds to establish, so it would be slow if it had to be done for every test plan execution.

I’ve considered several approaches, such as,

1. 1. simply allowing DUT Open to be called each time a workflow’s test plan is loaded and only calling Close when the diagnostic session is over. There’s a risk when opening a workflow plan fails on resource loading like a result listener connection, which would close the DUT connection too.
2. 2.reference counting to guard the DUT Open and Close. This could possibly work, but it seems like a janky reinvention of resource management.
3. 3.TestPlanReference to each workflow within an anchor test plan. This falls apart when workflows are added or removed because the anchor test plan needs to be updated too. I understand that dynamic test plan references are not allowed once a test plan is loaded.

I’d appreciate it if I can get a nudge in the right direction. Is what I want to achieve even possible or practical in OpenTAP?

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [October 8, 2026, 7:22am UTC](https://forum.opentap.io/t/maintaining-dut-connection-across-different-test-plans/2710/2 "2026-10-08T07:22:21Z")

</div>

Hi @yuancai,

There is a feature in Keysight Test Automation that does something like this. If you click this connect button (highlighted with red), it will connect all resources referenced in the test plan and keep them open for multiple runs. New resources used will also automatically be opened and kept open until you click the button again.

 ![Untitled](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/e/e76d150fe8e9080d2e432f527b2f3d8604b436a3.png)
