Extract a value from a List and asign this value as an output

Hello,

I would like to know if there is a possibility to select specific (explicit) values that are set by a TestStep into a table (i.e., a list of class objects) and use only those as output values. My goal is to assign only certain explicit values as outputs, rather than returning the entire table.

I have attached two images for clarification. The first image shows my current workaround, which is not optimal. In contrast, the second image illustrates the desired approach, where I can select specific values from a customized table. These selected values should then be available for use in subsequent TestSteps.

Additionally, I would like to know if it is possible to dynamically write values into a table, similar to how I would like to read/select them.

I would greatly appreciate any guidance or suggestions.

Thank you very much!


Hi @janwo,

I am trying to wrap my head around why you’d want to do this.

It seems like you could do the same with just the number or text mixins. That is, dynamically creating named parameters and assigning values to them.

Is it because you want to interact with the value in a table format? Does the name or value change during test plan execution?

1 Like

Hi @rolf_madsen,

Thank you!!!
As a OpenTap-Beginner I did not knew about this smart way yet.
Your response helped me very much!

1 Like

Unfortunately, it seems that this is not a suitable solution.
The reason is that I want to define a parameter whose value is set during the execution of the TestStep. This value should then be used as an output for subsequent TestSteps. The Name of the Parameter is threfore significant.

You can set the value during execution, but it requires doing a bit of reflection in the test step. This is what the Parameter Sweep step does:

   TypeData.FromType(this).GetMember(Parameter Name).SetValue(this, New Value);