Adnan Ghaffar
Adnan Ghaffar

Reputation: 1423

Robot Framework :I am getting "FAIL : NoSectionError: No section: 'default' " error when i connect the Robot Framework with MySql

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

Answers (1)

Harri
Harri

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:

http://franz-see.github.io/Robotframework-Database-Library/api/0.5/DatabaseLibrary.html#Connect%20To%20Database

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

Related Questions