Skip to content

Releases: MarketSquare/AssertionEngine

AssertionEngine 5.0.1

04 Jun 12:57

Choose a tag to compare

Return is_truthy and AssertionEngine special cases for False strings.

AssertionEngine 5.0.0

01 Jun 18:55

Choose a tag to compare

Assertion operator matches enhancements.

There are three different possibilities what keyword returns when matches operator is used: string, tuple or dictionary. What keyword returns depends on how the RegEx formed. If RegEx does not contain group(s), then keyword will return the string without modifications. If RegEx contains groups, meaning (...), then keyword will return a tuple. Each tuple item contains the text which is matched by the group. If there is group and group has a name, (?P<name>...) syntax, then keyword returns a dictionary. In this case dictionary key is the group name and value contains the matched text. If there mix of groups and groups with names, then tuple is returned.

Example assume that text returned by the system under test is: "Your order number is 123456 and total price is 98.76€."

*** Test Cases ***
No Group String As Return Value
    ${result} =    Keyword    ${selector}    matches    order number is
    Should Be Equal    ${result}    Your order number is 123456 and total price is 98.76€.

Single Group Tuple As Return Value
    ${result} =    Keyword    ${selector}    matches    order number is (\\d+)
    Length Should Be    ${result}    1
    Should Be Equal    ${result}[0]    123456

Multiple Groups Tuple As Return Value
    ${result} =    Keyword    ${selector}    matches    (\\d+) .* (\\d+\\.\\d+)
    Length Should Be    ${result}    2
    Should Be Equal    ${result}[0]    123456
    Should Be Equal    ${result}[1]    98.76

Groups With Names Dictionary As Return Value
    ${result} =    Keyword    ${selector}    matches    (?P<order_number>\\d+) .* (?P<total_price>\\d+\\.\\d+)
    Length Should Be    ${result}    2
    Should Be Equal    ${result['order_number']}    123456
    Should Be Equal    ${result['total_price']}    98.76

Mixed With Group And Group Names
    ${result} =    Keyword    ${selector}    matches    (\\d+) .* (?P<total_price>\\d+\\.\\d+)
    Length Should Be    ${result}    2
    Should Be Equal    ${result}[0]    123456
    Should Be Equal    ${result}[1]    98.76

AssertionEngine 4.0.0

01 Jun 18:49

Choose a tag to compare

Removes the formatter module for code clarity.

AssertionEngine 3.5.0

11 Feb 13:41

Choose a tag to compare

Returns formatter module for backward compatibility.

AssertionEngine 3.1.3

29 Jan 21:14

Choose a tag to compare

Add int_str_verify_assertion to public API

AssertionEngine 3.1.1

29 Jan 20:27

Choose a tag to compare

New int_str_verify_assertion methoed

AssertionEngine 3.0.3

21 Nov 19:21

Choose a tag to compare

Support for Robot Framework 7

AssertionEngine 3.0.2

11 Nov 16:40

Choose a tag to compare

Define only minimum RF version. To ease migration to upcoming RF 7.0

AssertionEngine 3.0.0

21 Oct 00:10

Choose a tag to compare

Is backwards incompatible release with changes to defining scopes. Now scoping is moved to library maintainer side and AssertionEngine does not anymore has keyword for defining scope.

AssertionEngine 2.0.0

30 Aug 19:48

Choose a tag to compare

Changes how error messages are logged out if received value or expected message is string. Instead logging messages as plain text, string are converted with repl to a printable representation of string. Example different white space characters are printed out with Unicode value.