Releases: MarketSquare/AssertionEngine
AssertionEngine 5.0.1
AssertionEngine 5.0.0
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.76AssertionEngine 4.0.0
Removes the formatter module for code clarity.
AssertionEngine 3.5.0
Returns formatter module for backward compatibility.
AssertionEngine 3.1.3
Add int_str_verify_assertion to public API
AssertionEngine 3.1.1
New int_str_verify_assertion methoed
AssertionEngine 3.0.3
Support for Robot Framework 7
AssertionEngine 3.0.2
Define only minimum RF version. To ease migration to upcoming RF 7.0
AssertionEngine 3.0.0
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
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.