Reputation: 1423
Below my code to connect with Mysql database, but when i run the code its shows "FAIL : NoSectionError: No section: 'default' ". I want to know that how to connect with Mysql from Robot framework. i have installed Database Library and its fine but problem in code.
*** Setting ***
Library Selenium2Library
Library DatabaseLibrary
Resource LoginRes.txt
*** Variables ***
#${PythonPath} c:\Python26
#${url} http://localhost/dt_qa/
*** Test Cases ***
DT Login
[Tags] Iteration-3 Smoke
dbConn
Connect to Database
Check if not exists in database select * from services
Upvotes: 0
Views: 3394
Reputation: 2732
I've never used database library but the documenation says that you need to pass few arguments to Connect To Database
or have proper configuration file in place. So plase double check your configuration file, or if you are not using one, add proper arguments.
Check the docs for further info:
Connect To Database MySQLdb my_databse user password db.host.example port
Also make sure you got MySQL driver installed https://pypi.python.org/pypi/MySQL-python/
Upvotes: 3