From 70cee1740bea6b9c934abec00a114c0200743b03 Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 30 Jul 2024 03:17:26 +0200 Subject: [PATCH 01/10] Keyword 'Check Row Count' using assertion engine --- src/DatabaseLibrary/__init__.py | 5 +++ src/DatabaseLibrary/assertion.py | 37 +++++++++++++++++++ .../assertion_error_messages.robot | 13 +++++++ test/tests/common_tests/basic_tests.robot | 3 ++ 4 files changed, 58 insertions(+) diff --git a/src/DatabaseLibrary/__init__.py b/src/DatabaseLibrary/__init__.py index 1bf24f09..1c999dc5 100644 --- a/src/DatabaseLibrary/__init__.py +++ b/src/DatabaseLibrary/__init__.py @@ -89,6 +89,11 @@ class DatabaseLibrary(ConnectionManager, Query, Assertion): | Switch Database mysql | Execute Sql String drop table XYZ | + + == Inline assertions == + Keywords that accept arguments ``assertion_operator`` <`AssertionOperator`> and ``assertion_value`` + perform a check according to the specified condition. + == Database modules compatibility == The library is basically compatible with any [https://peps.python.org/pep-0249|Python Database API Specification 2.0] module. diff --git a/src/DatabaseLibrary/assertion.py b/src/DatabaseLibrary/assertion.py index 88d1a917..42c06cca 100644 --- a/src/DatabaseLibrary/assertion.py +++ b/src/DatabaseLibrary/assertion.py @@ -13,6 +13,7 @@ # limitations under the License. from typing import Optional, Tuple +from assertionengine import AssertionOperator, verify_assertion from robot.api import logger @@ -247,6 +248,42 @@ def row_count_is_less_than_x( msg or f"Expected less than {numRows} rows, but {num_rows} were returned from '{selectStatement}'" ) + def check_row_count( + self, + selectStatement: str, + assertion_operator: AssertionOperator, + expected_value: int, + assertion_message: Optional[str] = None, + sansTran: bool = False, + alias: Optional[str] = None, + parameters: Optional[Tuple] = None, + ): + """ + Check the number of rows returned from ``selectStatement`` using ``assertion_operator`` + and ``expected_value``. See `Inline assertions` for more details. + + Use optional ``assertion_message`` to override the default error message. + + Set optional input ``sansTran`` to _True_ to run command without an explicit transaction commit or rollback. + + Use optional ``alias`` parameter to specify what connection should be used for the query if you have more + than one connection open. + + Use optional ``parameters`` for query variable substitution (variable substitution syntax may be different + depending on the database client). + + Examples: + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | == | 1 | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | >= | 2 | assertion_message=my error message | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | inequal | 3 | alias=my_alias | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | less than | 4 | sansTran=True | + | @{parameters} | Create List | John | + | Check Row Count | SELECT id FROM person WHERE first_name = %s | equals | 5 | parameters=${parameters} | + """ + logger.info(f"Executing : Check Row Count | {selectStatement} | {assertion_operator} | {expected_value}") + num_rows = self.row_count(selectStatement, sansTran, alias=alias, parameters=parameters) + return verify_assertion(num_rows, assertion_operator, expected_value, "Wrong row count:", assertion_message) + def table_must_exist( self, tableName: str, sansTran: bool = False, msg: Optional[str] = None, alias: Optional[str] = None ): diff --git a/test/tests/common_tests/assertion_error_messages.robot b/test/tests/common_tests/assertion_error_messages.robot index 35d81e47..32359df7 100644 --- a/test/tests/common_tests/assertion_error_messages.robot +++ b/test/tests/common_tests/assertion_error_messages.robot @@ -103,3 +103,16 @@ Verify Row Count Is Greater Than X Fails With Message ... Row Count Is Greater Than X ... ${Existing Select} 1 ... msg=${Error Message} + +Check Row Count With Assertion Engine Fails + ${expected value}= Set Variable 5 + ${expected error}= Catenate + ... Wrong row count: '1' (int) should be '${expected value}' (int) + Run Keyword And Expect Error + ... ${expected error} + ... Check Row Count ${Existing Select} equals ${expected value} + +Check Row Count With Assertion Engine Fails With Message + Run Keyword And Expect Error ${Error Message} + ... Check Row Count ${Existing Select} less than 1 + ... assertion_message=${Error Message} diff --git a/test/tests/common_tests/basic_tests.robot b/test/tests/common_tests/basic_tests.robot index 2fe17bc3..3d6cf410 100644 --- a/test/tests/common_tests/basic_tests.robot +++ b/test/tests/common_tests/basic_tests.robot @@ -63,6 +63,9 @@ Retrieve Row Count Log ${output} Should Be Equal As Strings ${output} 2 +Check Row Count With Assertion Engine + Check Row Count SELECT id FROM person == 2 + Retrieve records from person table ${output}= Execute SQL String SELECT * FROM person Log ${output} From 0f551e1ce5f4596f6ab70aac0eed468f0ea97a59 Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 30 Jul 2024 03:25:28 +0200 Subject: [PATCH 02/10] Deprecate old "row count" assertion keywords --- src/DatabaseLibrary/assertion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/DatabaseLibrary/assertion.py b/src/DatabaseLibrary/assertion.py index 42c06cca..2f45257a 100644 --- a/src/DatabaseLibrary/assertion.py +++ b/src/DatabaseLibrary/assertion.py @@ -107,6 +107,9 @@ def row_count_is_0( parameters: Optional[Tuple] = None, ): """ + *DEPRECATED* Use new `Check Row Count` keyword with assertion engine instead. + The deprecated keyword will be removed in future versions. + Check if any rows are returned from the submitted ``selectStatement``. If there are, then this will throw an AssertionError. @@ -144,6 +147,9 @@ def row_count_is_equal_to_x( parameters: Optional[Tuple] = None, ): """ + *DEPRECATED* Use new `Check Row Count` keyword with assertion engine instead. + The deprecated keyword will be removed in future versions. + Check if the number of rows returned from ``selectStatement`` is equal to the value submitted. If not, then this will throw an AssertionError. @@ -182,6 +188,9 @@ def row_count_is_greater_than_x( parameters: Optional[Tuple] = None, ): """ + *DEPRECATED* Use new `Check Row Count` keyword with assertion engine instead. + The deprecated keyword will be removed in future versions. + Check if the number of rows returned from ``selectStatement`` is greater than the value submitted. If not, then this will throw an AssertionError. @@ -220,6 +229,9 @@ def row_count_is_less_than_x( parameters: Optional[Tuple] = None, ): """ + *DEPRECATED* Use new `Check Row Count` keyword with assertion engine instead. + The deprecated keyword will be removed in future versions. + Check if the number of rows returned from ``selectStatement`` is less than the value submitted. If not, then this will throw an AssertionError. From d86d837897e3baa8330ed5f99bf66d764c63ea44 Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 30 Jul 2024 03:30:38 +0200 Subject: [PATCH 03/10] Link to Assertion Engine in docs --- src/DatabaseLibrary/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DatabaseLibrary/__init__.py b/src/DatabaseLibrary/__init__.py index 1c999dc5..ac57e354 100644 --- a/src/DatabaseLibrary/__init__.py +++ b/src/DatabaseLibrary/__init__.py @@ -91,8 +91,8 @@ class DatabaseLibrary(ConnectionManager, Query, Assertion): | == Inline assertions == - Keywords that accept arguments ``assertion_operator`` <`AssertionOperator`> and ``assertion_value`` - perform a check according to the specified condition. + Keywords that accept arguments ``assertion_operator`` <`AssertionOperator`> and ``expected_value`` + perform a check according to the specified condition - using the [https://github.com/MarketSquare/AssertionEngine|Assertion Engine]. == Database modules compatibility == The library is basically compatible with any [https://peps.python.org/pep-0249|Python Database API Specification 2.0] module. From ac9026148f1ab97e68d6b46819f83e2ecb49aede Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 30 Jul 2024 03:37:51 +0200 Subject: [PATCH 04/10] Deprecate duplicating "check exists" assertion keywords --- src/DatabaseLibrary/assertion.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DatabaseLibrary/assertion.py b/src/DatabaseLibrary/assertion.py index 2f45257a..96bcf767 100644 --- a/src/DatabaseLibrary/assertion.py +++ b/src/DatabaseLibrary/assertion.py @@ -31,6 +31,9 @@ def check_if_exists_in_database( parameters: Optional[Tuple] = None, ): """ + *DEPRECATED* Use new `Check Row Count` keyword with assertion engine instead. + The deprecated keyword will be removed in future versions. + Check if any row would be returned by given the input ``selectStatement``. If there are no results, then this will throw an AssertionError. @@ -68,6 +71,9 @@ def check_if_not_exists_in_database( parameters: Optional[Tuple] = None, ): """ + *DEPRECATED* Use new `Check Row Count` keyword with assertion engine instead. + The deprecated keyword will be removed in future versions. + This is the negation of `check_if_exists_in_database`. Check if no rows would be returned by given the input ``selectStatement``. If there are any results, then this From 4674e4c89ab1be8c6571e9e714f7bb3fe997e472 Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 30 Jul 2024 03:38:33 +0200 Subject: [PATCH 05/10] Log returned number of rows for possible debugging purposes --- src/DatabaseLibrary/query.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DatabaseLibrary/query.py b/src/DatabaseLibrary/query.py index 8b40a073..88ea88b9 100644 --- a/src/DatabaseLibrary/query.py +++ b/src/DatabaseLibrary/query.py @@ -126,8 +126,11 @@ def row_count( self.__execute_sql(cur, selectStatement, parameters=parameters) data = cur.fetchall() if db_connection.module_name in ["sqlite3", "ibm_db", "ibm_db_dbi", "pyodbc"]: - return len(data) - return cur.rowcount + current_row_count = len(data) + else: + current_row_count = cur.rowcount + logger.info(f"Retrieved {current_row_count} rows") + return current_row_count finally: if cur and not sansTran: db_connection.client.rollback() From 89e98b87f658ae6dea448c05d4ab7b92923bc14c Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 30 Jul 2024 03:40:32 +0200 Subject: [PATCH 06/10] Put Assertion Engine to dependencies --- pyproject.toml | 8 +++++--- requirements.txt | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2d05e7a7..0fcd0e9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,8 @@ [build-system] requires = [ "setuptools>=61.0", - "robotframework" + "robotframework", + "robotframework-assertion-engine" ] build-backend = "setuptools.build_meta" @@ -11,10 +12,11 @@ authors = [{name="Franz Allan Valencia See", email="franz.see@gmail.com"}, ] description = "Database Library for Robot Framework" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.8.1" dependencies = [ "robotframework", - "robotframework-excellib" + "robotframework-excellib", + "robotframework-assertion-engine" ] classifiers = [ "Programming Language :: Python :: 3", diff --git a/requirements.txt b/requirements.txt index a6421b7a..0a7cdb7b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ robotframework robotframework-excellib +robotframework-assertion-engine +psycopg2-binary pre-commit build twine \ No newline at end of file From e882840ee8d1144fe50d066bd339278d12e6eb81 Mon Sep 17 00:00:00 2001 From: amochin Date: Tue, 6 Aug 2024 12:09:35 +0200 Subject: [PATCH 07/10] Require min. Python 3.8 and RF 5.0.1 --- .github/workflows/unit_tests.yml | 7 ++----- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 1f284dc8..b036e639 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -12,12 +12,9 @@ jobs: fail-fast: false matrix: include: - - os: 'ubuntu-latest' - python-version: '3.7' - rf-version: '3.2.2' - os: 'ubuntu-latest' python-version: '3.8' - rf-version: '4.1.3' + rf-version: '5.0.1' - os: 'ubuntu-latest' python-version: '3.9' rf-version: '5.0.1' @@ -29,7 +26,7 @@ jobs: rf-version: '6.1.1' - os: 'ubuntu-latest' python-version: '3.12' - rf-version: '7.0a1' + rf-version: '7.0.1' runs-on: ${{ matrix.os }} steps: diff --git a/pyproject.toml b/pyproject.toml index 0fcd0e9f..7a3d83aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "setuptools>=61.0", - "robotframework", + "robotframework>=5.0.1", "robotframework-assertion-engine" ] build-backend = "setuptools.build_meta" @@ -14,7 +14,7 @@ description = "Database Library for Robot Framework" readme = "README.md" requires-python = ">=3.8.1" dependencies = [ - "robotframework", + "robotframework>=5.0.1", "robotframework-excellib", "robotframework-assertion-engine" ] From e9924d493325e733235a6fedfe52751c29069c5e Mon Sep 17 00:00:00 2001 From: amochin Date: Mon, 12 Aug 2024 15:17:19 +0200 Subject: [PATCH 08/10] improve common docs --- src/DatabaseLibrary/__init__.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/DatabaseLibrary/__init__.py b/src/DatabaseLibrary/__init__.py index ac57e354..2995663b 100644 --- a/src/DatabaseLibrary/__init__.py +++ b/src/DatabaseLibrary/__init__.py @@ -27,17 +27,20 @@ class DatabaseLibrary(ConnectionManager, Query, Assertion): The Database Library for [https://robotframework.org|Robot Framework] allows you to query a database and verify the results. It requires an appropriate *Python module to be installed separately* - depending on your database, like e.g. `oracledb` or `pymysql`. - == Requirements == + == Table of contents == + %TOC% + + = Requirements = - Python - Robot Framework - Python database module you're going to use - e.g. `oracledb` - == Installation == + = Installation = | pip install robotframework-databaselibrary Don't forget to install the required Python database module! - == Usage example == - === Basic usage === + = Usage example = + == Basic usage == | *** Settings *** | Library DatabaseLibrary | Test Setup Connect To My Oracle DB @@ -65,7 +68,7 @@ class DatabaseLibrary(ConnectionManager, Query, Assertion): | Check If Not Exists In Database ${sql} | - === Handling multiple database connections === + == Handling multiple database connections == | *** Settings *** | Library DatabaseLibrary | Test Setup Connect To All Databases @@ -90,11 +93,13 @@ class DatabaseLibrary(ConnectionManager, Query, Assertion): | Execute Sql String drop table XYZ | - == Inline assertions == + = Inline assertions = Keywords that accept arguments ``assertion_operator`` <`AssertionOperator`> and ``expected_value`` perform a check according to the specified condition - using the [https://github.com/MarketSquare/AssertionEngine|Assertion Engine]. + | Check Row Count SELECT id FROM person == 2 + | Check Query Result SELECT first_name FROM person contains Allan - == Database modules compatibility == + = Database modules compatibility = The library is basically compatible with any [https://peps.python.org/pep-0249|Python Database API Specification 2.0] module. However, the actual implementation in existing Python modules is sometimes quite different, which requires custom handling in the library. From 65fca44902b00eec88b0790a263a218874b13b5e Mon Sep 17 00:00:00 2001 From: amochin Date: Mon, 12 Aug 2024 15:18:10 +0200 Subject: [PATCH 09/10] New keyword 'Check Query Result' --- src/DatabaseLibrary/assertion.py | 71 +++++++++++++++++-- .../assertion_error_messages.robot | 15 ++++ test/tests/common_tests/basic_tests.robot | 15 ++++ 3 files changed, 95 insertions(+), 6 deletions(-) diff --git a/src/DatabaseLibrary/assertion.py b/src/DatabaseLibrary/assertion.py index 96bcf767..d4182779 100644 --- a/src/DatabaseLibrary/assertion.py +++ b/src/DatabaseLibrary/assertion.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional, Tuple +from typing import Any, Optional, Tuple from assertionengine import AssertionOperator, verify_assertion from robot.api import logger @@ -291,17 +291,76 @@ def check_row_count( depending on the database client). Examples: - | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | == | 1 | - | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | >= | 2 | assertion_message=my error message | - | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | inequal | 3 | alias=my_alias | - | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | less than | 4 | sansTran=True | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | *==* | 1 | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | *>=* | 2 | assertion_message=my error message | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | *inequal* | 3 | alias=my_alias | + | Check Row Count | SELECT id FROM person WHERE first_name = 'John' | *less than* | 4 | sansTran=True | | @{parameters} | Create List | John | - | Check Row Count | SELECT id FROM person WHERE first_name = %s | equals | 5 | parameters=${parameters} | + | Check Row Count | SELECT id FROM person WHERE first_name = %s | *equals* | 5 | parameters=${parameters} | """ logger.info(f"Executing : Check Row Count | {selectStatement} | {assertion_operator} | {expected_value}") num_rows = self.row_count(selectStatement, sansTran, alias=alias, parameters=parameters) return verify_assertion(num_rows, assertion_operator, expected_value, "Wrong row count:", assertion_message) + def check_query_result( + self, + selectStatement, + assertion_operator: AssertionOperator, + expected_value: Any, + row=0, + col=0, + assertion_message: Optional[str] = None, + sansTran: bool = False, + alias: Optional[str] = None, + parameters: Optional[Tuple] = None, + ): + """ + Check value in query result returned from ``selectStatement`` using ``assertion_operator`` and ``expected_value``. + The value position in results can be adjusted using ``row`` and ``col`` parameters (0-based). + See `Inline assertions` for more details. + + *The assertion in this keyword is type sensitive!* + The ``expected_value`` is taken as a string, no argument conversion is performed. + Use RF syntax like ``${1}`` for numeric values. + + Use optional ``assertion_message`` to override the default error message. + + Set optional input ``sansTran`` to _True_ to run command without an explicit transaction commit or rollback. + + Use optional ``alias`` parameter to specify what connection should be used for the query if you have more + than one connection open. + + Use optional ``parameters`` for query variable substitution (variable substitution syntax may be different + depending on the database client). + + Examples: + | Check Query Result | SELECT first_name FROM person | *contains* | Allan | + | Check Query Result | SELECT first_name, last_name FROM person | *==* | Schneider | row=1 | col=1 | + | Check Query Result | SELECT id FROM person WHERE first_name = 'John' | *==* | 2 | # Fails, if query returns an integer value | + | Check Query Result | SELECT id FROM person WHERE first_name = 'John' | *==* | ${2} | # Works, if query returns an integer value | + | Check Query Result | SELECT first_name FROM person | *equal* | Franz Allan | 2 | assertion_message=my error message | + | Check Query Result | SELECT first_name FROM person | *inequal* | John | alias=my_alias | + | Check Query Result | SELECT first_name FROM person | *contains* | Allan | sansTran=True | + | @{parameters} | Create List | John | + | Check Query Result | SELECT first_name FROM person | *contains* | Allan | parameters=${parameters} | + """ + logger.info( + f"Executing : Check Query Results | {selectStatement} | {assertion_operator} | {expected_value} | row = {row} | col = {col} " + ) + query_results = self.query(selectStatement, sansTran, alias=alias, parameters=parameters) + + row_count = len(query_results) + assert row < row_count, f"Checking row '{row}' is not possible, as query results contain {row_count} rows only!" + col_count = len(query_results[row]) + assert ( + col < col_count + ), f"Checking column '{col}' is not possible, as query results contain {col_count} columns only!" + + actual_value = query_results[row][col] + return verify_assertion( + actual_value, assertion_operator, expected_value, "Wrong query result:", assertion_message + ) + def table_must_exist( self, tableName: str, sansTran: bool = False, msg: Optional[str] = None, alias: Optional[str] = None ): diff --git a/test/tests/common_tests/assertion_error_messages.robot b/test/tests/common_tests/assertion_error_messages.robot index 32359df7..28ac5040 100644 --- a/test/tests/common_tests/assertion_error_messages.robot +++ b/test/tests/common_tests/assertion_error_messages.robot @@ -116,3 +116,18 @@ Check Row Count With Assertion Engine Fails With Message Run Keyword And Expect Error ${Error Message} ... Check Row Count ${Existing Select} less than 1 ... assertion_message=${Error Message} + + +Check Query Result With Assertion Engine Fails + ${expected value}= Set Variable ${5} + ${expected error}= Catenate + ... Wrong query result: '1' (int) should be '${expected value}' (int) + Run Keyword And Expect Error + ... ${expected error} + ... Check Query Result ${Existing Select} equals ${expected value} + + +Check Query Result With Assertion Engine Fails With Message + Run Keyword And Expect Error ${Error Message} + ... Check Query Result ${Existing Select} less than ${1} + ... assertion_message=${Error Message} diff --git a/test/tests/common_tests/basic_tests.robot b/test/tests/common_tests/basic_tests.robot index 3d6cf410..4cbdadb9 100644 --- a/test/tests/common_tests/basic_tests.robot +++ b/test/tests/common_tests/basic_tests.robot @@ -66,6 +66,21 @@ Retrieve Row Count Check Row Count With Assertion Engine Check Row Count SELECT id FROM person == 2 +Check Query Result With Assertion Engine + Check Query Result SELECT first_name FROM person contains Allan + +Check Query Result With Assertion Engine - Different Row And Col + Check Query Result SELECT first_name, last_name, id FROM person >= ${2} row=1 col=2 + +Check Query Result With Assertion Engine - Row Out Of Range + Run Keyword And Expect Error Checking row '2' is not possible, as query results contain 2 rows only! + ... Check Query Result SELECT first_name FROM person == Blah row=2 + +Check Query Result With Assertion Engine - Col Out Of Range + Run Keyword And Expect Error Checking column '5' is not possible, as query results contain 2 columns only! + ... Check Query Result SELECT id, first_name FROM person == Blah col=5 + + Retrieve records from person table ${output}= Execute SQL String SELECT * FROM person Log ${output} From e1911fe1836a021ab820397de1a4d39bb8aa9acc Mon Sep 17 00:00:00 2001 From: amochin Date: Mon, 12 Aug 2024 16:13:37 +0200 Subject: [PATCH 10/10] Typo in docs --- src/DatabaseLibrary/assertion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DatabaseLibrary/assertion.py b/src/DatabaseLibrary/assertion.py index d4182779..e96b65d3 100644 --- a/src/DatabaseLibrary/assertion.py +++ b/src/DatabaseLibrary/assertion.py @@ -338,7 +338,7 @@ def check_query_result( | Check Query Result | SELECT first_name, last_name FROM person | *==* | Schneider | row=1 | col=1 | | Check Query Result | SELECT id FROM person WHERE first_name = 'John' | *==* | 2 | # Fails, if query returns an integer value | | Check Query Result | SELECT id FROM person WHERE first_name = 'John' | *==* | ${2} | # Works, if query returns an integer value | - | Check Query Result | SELECT first_name FROM person | *equal* | Franz Allan | 2 | assertion_message=my error message | + | Check Query Result | SELECT first_name FROM person | *equal* | Franz Allan | assertion_message=my error message | | Check Query Result | SELECT first_name FROM person | *inequal* | John | alias=my_alias | | Check Query Result | SELECT first_name FROM person | *contains* | Allan | sansTran=True | | @{parameters} | Create List | John |