Hello, I am new with TestStand(TestStand 2019 32 bit). I just want to ask on how to implement calling of sequence dynamically?
In my case, I have my test Order( Test id's from 1,2,3....). It is predefined already before start of test, what I want to know is how to call a specific sequence/actions in reference to my Test Order.
Pre defined Test Order
Test 1-- Call sequence #1
Test 2--Call sequence #2
Test 3--Call sequence #3
Test 5--Call sequence #5
Appreciate your feedback
Using the expression to call a sequence is the simplest way to do this. However, it assumes that all of your sequence calls use the same parameters (prototype).
What you want can be super complex or fairly simple depending on your needs. If all of the sequence calls do have the same prototype then looping on an array with sequence names and using the expression is the way to go.
However, I've created systems where the user wanted to create recipes ahead of time. These recipes included parameters, limits and other information for each test. We built a recipe creator that they would run separate. It would read a sequence with steps that could be used in the test and they could edit things like parameters and limits, etc... Then it would spit out a JSON file. During execution the user would select a part number and recipe and we had an engine that would read in the proper JSON file and dynamically generate the sequence on the fly. This method might be overkill for what you are doing.
Another method I use is something called a Test Abstraction Layer (TAL). Basically a TAL is a sequence file with a single sequence that contains a sequence with a bunch of sequene calls calling my test sequences (we call those Test Modules). These sequence calls contain all of the steps, limits, parameters etc, and in the order we want. Then we just have MainSequence dynamically select which TAL to execute. Each TAL will have the steps in different orders and has the flexibility to do whatever it needs to. I have not seen a case yet where this didn't work...and we've written thousands of automated tests using this method.
Ultimately, if we had more information on your requirements we could direct you to the best solution.
I'd be interested in hearing more about your TAL. We have been using LV classes and dynamic dispatching for our HAL for a long time. We build the classes into packed libraries and dynamically instantiate at run time. However, I'm looking into whether it would be more advantageous and flexible to do an abstraction layer in TestStand sequences instead.
Do you have a whitepaper or examples you could share on your TAL concept?