xylix / AssertionEngine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion Engine

Generic way to create meaningful and easy to use assertions for the Robot Framework libraries. This tools is spin off from Browser library project, where the Assertion Engine was developed as part of the of library.

image

image

Supported Assertions

Currently supported assertion operators are:

Operator Alternative Operators Description Validate Equivalent
== equal, should be Checks if returned value is equal to expected value. value == expected
!= inequal, should not be Checks if returned value is not equal to expected value. value != expected
> greater than Checks if returned value is greater than expected value. value > expected
>= Checks if returned value is greater than or equal to expected value. value >= expected
< less than Checks if returned value is less than expected value. value < expected
<= Checks if returned value is less than or equal to expected value. value <= expected
*= contains Checks if returned value contains expected value as substring. expected in value
not contains Checks if returned value does not contain expected value as substring. expected not in value
^= should start with, starts Checks if returned value starts with expected value. re.search(f"^{expected}", value)
$= should end with, ends Checks if returned value ends with expected value. re.search(f"{expected}$", value)
matches Checks if given RegEx matches minimum once in returned value. re.search(expected, value)
validate Checks if given Python expression evaluates to True.
evaluate

then

When using this operator, the keyword does return the evaluated Python expression.

Usage

When keywords needs to do an assertion

About


Languages

Language:Python 99.1%Language:RobotFramework 0.9%