Robotframework can use Python and jython two legs. But sometimes you have to pick one. There is a problem today, in order to integrate the other modules must be implemented in Java Databaselibrary
Actually it is very simple, the recording steps are as follows: 1. Locate the home page of Databaselibrary (Java) on the home page of the RF. http://code.google.com/p/robotframework-dblibrary/Download Dblibrary-1.0.jar This library file 2. Find the JDBC driver in download on the Oracle home page (different version drivers, I use the 10g driver Class12.jar), or find the driver backup from the JDBC subdirectory of your installed Oracle directory. 3. Add all two jar files to the environment variable Classpath 4. The example of writing a test script connection in RF is as follows: Database
| Setting |
Value |
| Library |
Org.robot.database.keywords.DatabaseLibrary |
|
|
|
|
|
|
|
|
| Test case |
Action |
arguments |
| Test |
Connect to DataBase |
oracle.jdbc.driver.OracleDriver |
jdbc:oracle:thin:@x Xx.xxx.xxx.xxx:1521:sid |
username |
| |
... |
Password |
|
|
| |
|
|
|
|
The user manual is visible in the specific usage situation: http://robotframework-dblibrary.googlecode.com/svn/tags/robotframework-dblibrary-1.0/doc/ Databaselibrary.html two tip:1. For multi-person use, it is recommended to use BAT dynamics to add a jar package to the classpath. Instead of just writing to the environment variable (so your classpath is going to die slowly). Give a reference example: Set Cp=%classpath%for%%j in (*.jar) do (CALL:SET_CP%%j) set classpath=%cp% jybot--outputdir?%--suitestat Level 1%* goto:eof:set_cpset cp=%cp%?%\ %1;goto:eof 2. This classlibrary is open source, write very rough, feel uncomfortable can change their own, its code host in Google code on the use of SVN checkouthttp://code.google.com/p/ Robotframework-dblibrary/source/checkout
Using Robotframework's Databaselibrary (Java implementation)