I'm making a test using a query (I am using Execute SQL String instead of row count for now) to count the number of rows with the following code:
*** Settings ***
Library DatabaseLibrary
Library OperatingSystem
*** Variables ***
${DBName} db
${DBUser} user
${DBPass} password
${DBHost} hostname
${DBPort} port
*** Test Cases ***
Making row count
DatabaseLibrary.Connect To Database pymysql ${DBName} ${DBUser} ${DBPass} ${DBHost} ${DBPort}
${result} = Execute SQL String SELECT COUNT(*) as count_id FROM myTable; True
should be equal as strings ${result} 6
Disconnect From Database
If I go to my database I return 6 rows, so the test should me passed. However, using RobotFramework I am getting the following results:
==============================================================================
Making row count | FAIL |
None != 6
Why I am using None as result? I am using Execute SQL String because I have the same code for other tests with some more complex SQL Queries.
Thanks!