*** Test Cases ***
Create Person Table
${output}= Execute Sql String Create Table person(id integer,first_name varchar(20),last_name varchar(20));
Log To Console ${output}
Should Be Equal As Strings ${output} None
Error message:
dbTesting1 | FAIL |
Suite setup failed:
OperationalError: (2003, “Can’t connect to MySQL server on ‘DESKTOP-K60PBIF’ ([WinError 10061] No connection could be made because the target machine actively refused it)”)
Also suite teardown failed:
AttributeError: ‘NoneType’ object has no attribute ‘close’
*** Test Cases ***
Create Person Table
${output}= Execute Sql String Create Table person(id integer,first_name varchar(20),last_name varchar(20));
Log To Console ${output}
Should Be Equal As Strings ${output} None
Error message - output:
Create Person Table | FAIL |
Parent suite setup failed:
OperationalError: (18456, b"Login failed for user ‘Empty’.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 2
0002, severity 9:\nAdaptive Server connection failed (192.168.1.3)\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (192.168.1.3)\n")
dbTesting1 | FAIL |
Suite setup failed:
OperationalError: (18456, b"Login failed for user ‘Empty’.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 2
0002, severity 9:\nAdaptive Server connection failed (192.168.1.3)\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (192.168.1.3)\n")
Also suite teardown failed:
AttributeError: ‘NoneType’ object has no attribute ‘close’
Thanks for your reply, But I’m still facing the issue and unable to connect to the DB server.
I got a message from a friend, This seems to be an issue with Firewall access. Please check with developer or IT team to open up the firewall access for the given port number.
How we can approach the firewall access. What are the settings we have to do to overcome this.
If indeed it’s a firewall issue (nothing in your posts proves it is or isn’t) then there is nothing you can do, no setting you can change in robot framework that will change the firewall. As your friend advised you will need to get someone who can administer the firewall to make that change for you:
You can however test to see if it’s a firewall issue, you can run “Microsoft SQL server studio” (See the screen shot in your original post) on the same machine as you are running robot framework. if SQL Studio is able to connect from this machine to the database then it’s not a firewall issue, and that will also let you confirm if the user Empty with the password Empty is the correct username and password?
If you get a message about incorrect username or password, that would also indicate that it’s not a firewall issue but simply a user/password issue, try with a different username password, preferably one the DBA knows is working.