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

StackOverflow https://stackoverflow.com/questions/21746991

문제

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
도움이 되었습니까?

해결책

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top