# How to deal with test bench initialisation

**URL:** <https://forum.opentap.io/t/how-to-deal-with-test-bench-initialisation/2676>\
**Category:** General\
**Created:** [May 22, 2026, 8:32am UTC](https://forum.opentap.io/t/how-to-deal-with-test-bench-initialisation/2676 "2026-05-22T08:32:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![everthuijben](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@everthuijben](https://forum.opentap.io/u/everthuijben)\
**Post date:** [May 28, 2026, 9:11am UTC](https://forum.opentap.io/t/how-to-deal-with-test-bench-initialisation/2676/3 "2026-05-28T09:11:53Z")

</div>

Hi Marc,

Thank you for your input

I think we have to breakdown this issue in some pieces,  
Based on that, next steps might be a possible way to deal with this issue

- Selecting the correct .tapplan:  
This part can be done by a seperate GUI, or the command line settings of the Keysight Editor
- Scanning your product:  
I have not dived into this yet, but somehow a popup must occur to scan your Serial number of the DUT. I think making use of the DUT functionality should be able to take care of this. Idea’s are welcome.
- Detect the first time use of a testplan:  
Somehow the testplan should know that you are running the test for the first time  
I found next topic  
[https://forum.opentap.io/t/implementing-testplan-setup-and-teardown/790/2](https://forum.opentap.io/t/implementing-testplan-setup-and-teardown/790/2)  
It seems the methods `EnterTestPlanRun` and `ExitTestPlanRun` can be used to achieve what we want, but I expect a way to execute test steps in this case. Is it possible to set a test plan variable in these methods? e.g. TestplanSetup = True
- Execute a sequence based on a variable:  
I have seen that in the latest opentap package (33) a If Condition Flow is available.  
Somehow I expect that we can enter a flow based on the previous stored test plan variable.  
Basic question is if we can access a test plan variable in an expression in the ‘Condition’ field?  
At the end of this sequence we should set the TestplanSetup = False.  
Same procedure can be used for a teardown sequence
- Restart testplan with a new DUT:  
At the end of the testplan it should be possible to restart the test with a new DUT, but without running the setup. Since TestplanSetup = false, this sequence should be omitted.

Is this a working procedure? Or does anyone making use of a similar procedure?  
Especially the use of setting a variable in one of the initialisation methods and using them in a flow control step. Of does anyone have an alternative?

Thanks for your input

---

_[View the full topic](https://forum.opentap.io/t/how-to-deal-with-test-bench-initialisation/2676)._
