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 https://github.com/MarketSquare/AssertionEngine/actions/workflows/on-push.yml/badge.svg

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


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-0.6.1.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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