connecting to informix DB from robot framework

657 views
Skip to first unread message

KLP

unread,
Nov 28, 2013, 5:47:00 AM11/28/13
to robotframe...@googlegroups.com
Could you please let me know, how to connect to Informix DB from robot framework.Do, I need to install any specific Library files?
 
Tried using

Connect To Database

mxODBC   XXXX   XXXX   X.X.X.X

 

Densil D'silva

unread,
Dec 12, 2013, 4:45:16 AM12/12/13
to robotframe...@googlegroups.com
Can someone help to resolve this ? I am also looking for an answer as the steps required to connect to Informix using robotframework.

Jerry Schneider

unread,
Dec 12, 2013, 9:30:32 AM12/12/13
to robotframe...@googlegroups.com
There are a number of ways to connect depending on your situation. 

Try using commandline informix client using RobotFramework "Run" keyword
Try using Robotframework-DatabaseLibrary (Python) - http://franz-see.github.io/Robotframework-Database-Library/
Try using Robotframework-DatabaseLibrary (Java) - https://github.com/ThomasJaspers/robotframework-dblibrary

Hope one of these helps.

jer
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
Linux registered user #475536
Ubuntu registered user #28583

Kevin O.

unread,
Dec 12, 2013, 12:44:32 PM12/12/13
to robotframe...@googlegroups.com
If you have the ibm_db package and they Python DB library installed, then you should be able to use something like this:
Connect To Database    ibm_db    my_db_name    someUserName    somePassword


KLP

unread,
Dec 23, 2013, 7:04:17 AM12/23/13
to robotframe...@googlegroups.com
Hi Kevin,
 
Thanks for the reply.
 
As said , I hv installed ibm db and Robot framework database library.
have set the environment variables also-
IBM_DB_HOME :C:\Program Files\IBM\IBM DATA SERVER DRIVER
PYTHONPATH :  C:\Python27\Lib\site-packages\ibm_db-2.0.4.1-py2.7.egg-info;
 
but still gives me the following error , when did a sanity check from console-

D:\XXX\XX\XXX>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ibm_db
>>> ibm_db_conn = ibm_db.connect('ibm_db', 'XXX', 'XXX')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
 SQLCODE=-1531M][CLI Driver] SQL1531N  The connection failed because the name specified with the DSN connection string keyword could not be found in either the db2dsdriver.cfg configuration file or the db2cli.ini configuration file.  Data source name specified in the connection string: "IBM_DB".

 

(Also, I have added the  dbapiModuleName  - "ibm_db"  in connectionmanager.py of DatabaseLibrary

Do, I need to update any other files. Could you please let me know the exact steps.

Thanks in Advance
Parimala

 

 

Kevin O.

unread,
Dec 23, 2013, 12:04:56 PM12/23/13
to robotframe...@googlegroups.com
You should not have to modify the library (hopefully). The 'ibm_db' parameter is used by the library to dynamically import the ibm_db module.
Your sanity check does not make sense - ibm_db is a parameter to DB library's Connect To Database, not to ibm_db.connect. But at least it shows it is installed.

KLP

unread,
Dec 24, 2013, 7:35:26 AM12/24/13
to robotframe...@googlegroups.com


kevin,

 
I have just followed the steps given in - http://code.google.com/p/ibm-db/wiki/README
 

IBM_DB DB-API wrapper sanity test

$ python
Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ibm_db
>>> ibm_db_conn = ibm_db.connect('pydev', 'db2inst1', 'secret')
>>> import ibm_db_dbi
>>> conn = ibm_db_dbi.Connection(ibm_db_conn)
>>> conn.tables('SYSCAT', '%')

Reply all
Reply to author
Forward
0 new messages