I would like to make a testplan structure where I have one or more nested loop step where some can have several loop parameters (using the concept from ListOfObjects example). I think these loop steps will also setup the instruments and device under test using the loop parameters. Then I do not need to transfer data between steps.
Within this loop structure we will then have several steps doing the actual measurements. They do not need to know the state of the looping parameters. So, I do not need to transfer data between steps. (Unless test limits are depending on parameters)
This concept gives great flexibility to make use of small simple steps to make many different TestPlans using the same steps. No steps are really depending on other steps.
But. OpenTap encourage us to publish result tables, this does not goes nicely with this nice concept with small stand-a-lone steps.
My SQL ResultListener can keep track of which loop parameters are still in scope / active and store results with a reference to these active loop parameters.
Now to the question: What is the best / right way to publish parameters and results from steps. My SQL ResultListener should just be able so distinguishing parameters from results. How do I mark that data is a parameter, result or a test limit.
Hello @tch11 ,
I think that the Result.Publish is used only for Results.
The parameters can be accessed on your Result Listener implementation during the:
public override void OnTestStepRunCompleted(TestStepRun stepRun)
You can then obtain all the parameters used during the test that was just completed.
Thanks for the answer.
These testplan loop structures can get huge, take hours, even days to complete for R&D tests.
When using the OnTestStepRunCompleted to handle loop parameter logging we first have the full list of parameters when the most outmost loop step is done, and first then we can store the results with reference to the list of all loop parameters. So, the logger must collect data for hours before we have a complete data set. Not nice if something goes wrong, then hours of data is lost.
I can also see that Jason Hicks are make a hack in his else very help full Mongo DB listener example
MongoDB anyone? - #14 by jason.hicks.
In the example Parameters / Meta data are stored as results and he is distinguishing parameters from results solely by the structure of the data. This is a hack and will limit test step writers a lot in how to publish results. Do we have other solutions? Do we need to make a new requirement to the listener system?