Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature Request: More "Should" keywords for numeric testing #5406

Open
@ilfirin-ms

Description

@ilfirin-ms

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions