Best way to implement a generic Check Numeric Limits test step

We’re currently trying to implement a set of helper test steps that would allow for verification of measurements etc. in order to produce test verdict. While it’s pretty straightforward with strings and booleans, it’s not that obvious how to make a step that would be able to check value of any numeric datatype against limits. Sticking to Double as the only numeric datatype doesn’t seem right, neither does creating a step per datatype.

I assume such functionality might be interesting to other users, so I’d like to see if anyone has suggestions/experience of implementing it in a generic way.

Generally we prefer to assign inputs of such steps directly to outputs of steps that are responsible for outputting data but if we’d need to choose an input from the list that would also do.

Thanks!

1 Like

Currently the type of input and output has to match exactly, so there is not really any obvious way to do it at the moment.

Maybe we could add a conversion so that the input could just be and ‘object’ and the check numeric limits could then just reinterpret it as a double or integer, or whatever.

My suggestion would be to stick with ‘double’ for now.

1 Like

Maybe we could add a conversion so that the input could just be and ‘object’ and the check numeric limits could then just reinterpret it as a double or integer, or whatever.

That would be great!

For now we decided to go for a workaround. Our step will have a selector of datatype + a set of parameters with fixed datatypes while only the parameter of currently selected type will be shown. We find this solution a bit better than changing datatype to Double in many steps we have.