Skip to main content

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.

https://github.com/MarketSquare/AssertionEngine/actions/workflows/on-push.yml/badge.svg https://img.shields.io/badge/License-Apache%202.0-blue.svg

Supported Assertions

Currently supported assertion operators are:

Operator

Alternative Operators

Description

Validate Equivalent

==

equal, equals, 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

case insensitive

Converts value to lower case

Usage

When keywords needs to do an assertion

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_assertion_engine-2.0.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_assertion_engine-2.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_assertion_engine-2.0.0.tar.gz.

File metadata

File hashes

Hashes for robotframework_assertion_engine-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d22349784db8020786d2eb53512269dc757fb2398e36af644a5efa666794bbde
MD5 5ed7380e490becbd25bd0caaaa7462e6
BLAKE2b-256 13701984cc83ab28c7a08c9d7549fa1eef5f034ac70a3eed68a1ff4caf3d205b

See more details on using hashes here.

File details

Details for the file robotframework_assertion_engine-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_assertion_engine-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 094acf38f21a4e26cb079787b3f440172153dcc5db27bea06fa26149c0c8c7d4
MD5 084c663dc9341842fd6973aba769de45
BLAKE2b-256 f32bb0044671968fda0ae9124f378153d2d9d46dc55b6c437a5c0c5904be08f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page