Generic way to create meaningful and easy to use assertions for the Robot Framework libraries.
Project description
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.
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. |
Supported formatters:
Formatter |
Description |
---|---|
normalize spaces |
Substitutes multiple spaces to single space from the value |
strip |
Removes spaces from the beginning and end of the value |
apply to expected |
Applies rules also for the expected value |
Usage
When keywords needs to do an assertion
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for robotframework-assertion-engine-0.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74cc29f5fe7ce440280acb948e4574f8a3ed69b53e6a7e87bbf3902cae908633 |
|
MD5 | 54fe50ea48b96dc4ce188621c9da50ff |
|
BLAKE2b-256 | 4baa991264abb51d41525631f14d74bf22bef8ab4389d192d7115e82cd13121d |
Hashes for robotframework_assertion_engine-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e555f91fb3e332e3f2e390e71da94518435b6f589a8f7581d8a325995240641a |
|
MD5 | 8d52073e04256de36696ffb870553c75 |
|
BLAKE2b-256 | ce9490f0e5719e56f7dbd269c4dbb0de1e6ac08977bf4c48811c38b53b9e5bd2 |