So, I'd do something like this.
- selection of devices/tests
- button click to run script using the selected devices/tests:
devices = event.source.parent.getComponent('Device_selection_component').data
tests = event.source.parent.getComponent('Test_selection_component').data
results = [
[
run_test(dev, test) for test in tests
] for dev in devices
]
dataset = system.dataset.toPyDataSet(tests, results)
# add a column with the devices name if wanted:
dataset = system.dataset.addColumn(dataset, 0, devices, "devices", str)
event.source.parent.getComponent('Table').data = dataset
Note that this is pseudo-code in python/vision style.
This assumes your tests are executed with a function call run_test(device, test)
.
If you have several functions, you could use a mapping, or who a few other different solutions.