robotframework-assertion-engine
Generic way to create meaningful and easy to use assertions for the Robot Framework libraries.
What it is and what it does
The Assertion Engine is a utility library for Robot Framework that abstracts assertion logic into a reusable component. It was originally developed as part of the Browser library and extracted as a standalone tool for use by other Robot Framework library developers. The package provides a `verify_assertion` method that accepts a value, an assertion operator (such as `==`, `!=`, `>`, `*=`, regex `matches`, or custom Python `validate` expressions), and an expected value, then performs the validation and returns results or raises errors accordingly.
Library developers integrate this by calling `verify_assertion` within their keyword methods to perform inline assertions without reimplementing validation logic. The engine supports multiple assertion operators covering equality, comparison, substring matching, regex extraction with optional group capture (returning strings, tuples, or dictionaries), and custom Python expression evaluation. It also provides a formatter interface for preprocessing values (normalize spaces, strip, case insensitive) and allows custom error messages with optional prefixes.
Use it for:
- Developing Robot Framework libraries that need consistent, reusable assertion syntax across multiple keywords.
- Extracting and validating data from pages or APIs using regex groups and named capture groups.
- Implementing custom validation logic in Robot Framework keywords using Python expressions.
- Normalizing and comparing values with formatters like case-insensitive or whitespace-normalized matching.
- Building test libraries that support multiple assertion operators without duplicating validation code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a standardized assertion engine for Robot Framework libraries, enabling inline validation with operators like equality, comparison, regex matching, and custom Python expressions.
Yes, if you are developing Robot Framework libraries and want to standardize assertion behavior across keywords. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and has low install friction. It is most valuable for library developers rather than end-user test writers, as it is a building block for other libraries.
Install
robotframework-assertion-engine on PyPI
pip
pip install robotframework-assertion-engineuv
uv add robotframework-assertion-enginepoetry
poetry add robotframework-assertion-engineInstalling robotframework-assertion-engine
Before you install
Low install friction with a pure Python wheel distribution. Active maintenance with a recent commit on 2026-08-10 and a release on 2026-06-04. Requires Python 3.10 or later.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install robotframework-assertion-engine
from robotframework_assertion_engine import verify_assertion, AssertionOperator
value = "test string"
result = verify_assertion(value, AssertionOperator.EQUAL, "test string")
Requires Python 3.10 or later; depends on robotframework and robotframework-pythonlibcore.
Verify before relying
- Whether the package is actively used in production Robot Framework libraries beyond the Browser library.
- Performance characteristics when handling large regex matches or complex validation chains.
- Availability of comprehensive documentation or examples beyond the GitHub repository.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — robotframework, robotframework-pythonlibcore |
| Maintenance | actively maintained — 71 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 786,381/month — #5,065 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: robotframework_assertion_engine-5.0.1-py3-none-any.whl
Keywords: Robot Framework, Libraries, Assertions
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
robotframework-databaselibraryA Robot Framework library that adds keywords…
permissive · top 15,000 on PyPI
robotframework-seleniumlibrarySeleniumLibrary is a Robot Framework library…
permissive · top 5,000 on PyPI
robotframework-jsonlibraryA Robot Framework library for querying, adding,…
permissive · top 15,000 on PyPI
robotframework-browserBrowser automation library for Robot Framework…
permissive · top 5,000 on PyPI
suresure provides fluent, chainable assertion…
copyleft · top 15,000 on PyPI
RESTinstanceRESTinstance is a Robot Framework library that…
copyleft · top 15,000 on PyPI
robotframework-stacktraceA Robot Framework listener that prints stack…
permissive · top 15,000 on PyPI
robotframeworkRobot Framework is a generic open-source…
permissive · top 5,000 on PyPI
robotframework-robocopRobocop is a static code analysis tool and…
permissive · top 5,000 on PyPI
robotframework-excellibProvides Robot Framework keywords for reading,…
permissive · top 15,000 on PyPI