{"library":"robotframework-assertion-engine","title":"Robot Framework Assertion Engine","description":"Robot Framework Assertion Engine (version 4.0.0) provides a generic way to create meaningful and easy-to-use assertions for Robot Framework libraries. It is a spin-off from the Browser library project and offers a robust set of operators and formatters for in-keyword validation. The library is actively maintained with regular releases, including minor and major version updates to support new Robot Framework versions and introduce breaking changes.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install robotframework-assertion-engine"],"cli":null},"imports":["from AssertionEngine import AssertionEngine","from AssertionEngine import AssertionOperator"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom AssertionEngine import AssertionEngine\n\nclass MyAssertions:\n\n    def __init__(self):\n        self._assertion_engine = AssertionEngine()\n\n    def my_custom_assert_keyword(self, actual_value, operator, expected_value, message=\"\"):\n        \"\"\"\n        Performs an assertion using the AssertionEngine.\n\n        Example:\n        | My Custom Assert Keyword | hello | == | hello |\n        \"\"\"\n        print(f\"Performing assertion: '{actual_value}' {operator} '{expected_value}'\")\n        self._assertion_engine.verify_assertion(\n            actual_value=actual_value,\n            assertion_operator=operator,\n            assertion_expected=expected_value,\n            message=message\n        )\n\n    def verify_length(self, value, operator, expected_length):\n        \"\"\"\n        Verifies the length of a string or list.\n\n        Example:\n        | Verify Length | ${MY_LIST} | > | 3 |\n        \"\"\"\n        actual_length = len(value)\n        print(f\"Verifying length of '{value}' (actual: {actual_length}) {operator} {expected_length}\")\n        self._assertion_engine.verify_assertion(\n            actual_value=actual_length,\n            assertion_operator=operator,\n            assertion_expected=int(expected_length),\n            message=f\"Length of '{value}'\"\n        )\n\n# To run with Robot Framework, save the above as 'MyAssertions.py'\n# and create a .robot file like this:\n#\n# *** Settings ***\n# Library    MyAssertions.py\n#\n# *** Variables ***\n# ${MY_LIST}    ${{ [1, 2, 3, 4, 5] }}\n#\n# *** Test Cases ***\n# Test String Equality\n#     My Custom Assert Keyword    hello    ==    hello\n#\n# Test String Inequality\n#     My Custom Assert Keyword    world    !=    robot\n#\n# Test Length Greater Than\n#     Verify Length    ${MY_LIST}    >    3\n#\n# Test Length Equal To\n#     Verify Length    Python    ==    6\n","lang":"python","description":"This quickstart demonstrates how to integrate `robotframework-assertion-engine` into a custom Python library for Robot Framework. The `MyAssertions` class instantiates `AssertionEngine` and exposes keywords like `My Custom Assert Keyword` and `Verify Length` that utilize the engine's `verify_assertion` method. This allows library developers to easily add a wide range of assertions directly within their Python keywords, which can then be called from Robot Framework test cases.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"3.0.3","pypi_latest":"4.0.0","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"24.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.9,"import_time_s":null,"mem_mb":null,"disk_size":"25M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"27.0M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2,"import_time_s":null,"mem_mb":null,"disk_size":"27M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.9,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.3M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.9,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"23.6M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"robotframework-assertion-engine","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.2,"import_time_s":null,"mem_mb":null,"disk_size":"24M"}]}}