How to deal with test bench initialisation

Hi,
I am struggling with how to deal with test bench initialisation within OpenTAP.
I like to know if there is a recommended way of working when we are executing a testplan for multiple DUT’s, where the testbench needs to be initialised once for each kind of product. In my case the test bench initialisation means making several hardware connections and programming the bench firmware.
I was thinking about making a test plan parameter testBenchInitialised=False which is set to True after the first time setup. However I only can find a flow control step where child steps can be executed based on verdicts, not test plan parameters.

This is basically what I want:

Select Product

Start TestPlan for Product

Station Setup for Product testing
“Connect test board”
“Program test board”

Loop DUTs (all of Product x)
→ Insert DUT
→ Scan DUT serial
→ Run tests
→ Remove DUT
→ Store result to database
→ Repeat this loop for all available DUT’s

“Disconnect test board”

Does someone have experience with a similar setup? I think this a common way of working.
Some questions I have:

  • Which part of this setup should be in the tappplan?
  • Can we do this with the provided ( Flow Control) teststeps?
  • Do we have to make dedicated steps for this way of working?
  • Or is a seperate GUI required for this? Currently I am making use of the standard OpenTAP Editor with a script to startup the correct .TapPlan for the mentioned product

All recommendations/discussions are very welcome!

Regards Evert

Hallo Evert,

At our place we have the same open question. However, we explore the option with a separate GUI. As this opens a way to keep order/selection logic separated from the actual testplans, providing a clean separation.

Test paraments/DUT settings can be set via custom settings if required.

Alternative option could be to make a custom panel in the Editor .

Since this is also an open question for us, we are also curious what others have found as a solution.

Regards Marc

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
    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

I dealt with this by making a simple if x=y then execute child steps test step in Python. It broke with True/False since it expected numbers for the comparison so I think I need to do a if True step.

@robert.lamoreaux , do you have a screenshot or example to share? I was using a test plan variable (TestPlanSetup = True) for the validation. However resetting this test plan variable to False at the end of the sequence did not work out as expected. Although I parameterize both variables to the test plan, they to not synchronize property all over the test plan.

In general, I am still looking for a way how to execute a test sequence flow control step, depending on the first time bench initialization. I seems possible from the code where, both DUT and Instruments do have functions which are entered during initialisation.
However I like to run test steps in those cases.

If anyone has experience with this, please share your thoughts

Regards, Evert