Description
Standard Library only provides "Should Be Equal As Numbers" for numeric testing.
I am testing plenty of numerical values, which should fall to allowed range.
I am missing some "syntactic sugar"/"right way™" to do it, preferably one of "Should" keywords
I can do
Should Be True ${min} <= ${measured} <= ${max}
when I have min and max as separated values, often I have tuple, which lead to
Should Be True @{range_power}[0] <= ${psupply_reading.power} <= @{range_power}[1]
Or if looking for deltas
Should Be True abs(${measured} - ${reference}) <= ${allowed_delta}
in percents
Should Be True abs(100 * (${reference} - ${measured}) / ${reference}) <= ${allowed_delta_percent}
etc.
These I am using plenty and thing, there should be more explanatory/standardized syntax.
I can do custom keywords
"${measured} Should Be In Range @{range}"
etc. in own library, but feel, there should be more standard way to do it.
It does not concern only electrical values, it applies of response_time of servers and others.