DbFit problem with latest FitLibrary

443 views
Skip to first unread message

Setty

unread,
Oct 19, 2011, 4:58:27 AM10/19/11
to dbfit
Hi,
I'm using below version of jars in my current project:
Fitnesse - 20110104 version - 4,174,913 bytes
FitLibrary - 20110706 version - 16,451,187 bytes

I downloaded the latest DbFit jar from sourceforge
(dbfit-20080822.jar) and it is also part of my project.
But I'm not able to connect to database with this setup.

If I consider the Fitnesse and FitLibrary jars which come along with
dbfit-complete-20080822, the same test works.

Please help me to resolve the issue.

Thanks.

Test code:
!|dbfit.OracleTest|

!|Connect|<<Oracle Connection String>>|

!|Query| select 'test' as x from dual|
|x|
|test|

~ Raghavendra Setty

JanickeE

unread,
Dec 8, 2011, 9:09:18 AM12/8/11
to db...@googlegroups.com
Hi!
 
I have exactly the same problem!  Are you any closer to finding a solution?
 
I absolutely LOVE DbFit, and it was a breeze to set up and start using when I set it up using the dbfit-20080822.jar.  I work in a major oil company and we run a lot of tests of our database using DbFit.
 
But, add FitLibrary/Web to the mix... Not so easy!  (I want to setup a FitNesse envrionment and run my DbFit tests there and start writing 'traditional' FitNesse tests as well).  So I have set up a new FitNesse environment, added FitLibrary and FitLibraryWeb folders as per instructed in the releasenotes and I can't for the life of me figure out how to connect to the database.  And I keep reading something online about FitNesse having a DbFit wrapper - and that DbFit is included in FitNesse, but I still haven't figured out how I'm supposed to set this up...
 
Just wanted to say that I feel your pain :-)
 
Mvh
JanickeE

MatMan

unread,
Jul 8, 2012, 8:47:42 AM7/8/12
to db...@googlegroups.com
Try fitlibrary.database.Oracle instead of dbfit.OracleTest.

MatMan

unread,
Jul 30, 2012, 4:16:33 PM7/30/12
to db...@googlegroups.com
Excellent stuff!
 
Thanks for sharing that.

On Tuesday, 24 July 2012 21:54:59 UTC+1, Yavor Nikolov wrote:
Hi,
I managed to switch from plain dbfit to more current versions of fitnesse + FitLibrary + FitLibraryWeb. It got me some time to get all the pieces working together so here I'm sharing how it worked for me.

1) Setup fitnesse.
- I got current source code from github
- Compiled the source (with JDK 7 needs trivial patching of 3 unit tests; with JDK 6 compiles out of the box): ant release_jar
- Copy fitnesse-standalone.jar (and rename to fitnesse.jar) to a folder: cp fitnesse-standalone.jar $FITNESSE_HOME/fitnesse.jar
2) Setup FitnesseLibrary - downloaded current version (2.0) - copy content of fitnesse folder to $FITNESSE_HOME
3) Setup FitnesseLibraryWeb - same as above: download, unzip, copy content of fitnesse folder to $FITNESSE_HOME
4) Since I'm using recent versions of Oracle and Java - within lib replace ojdbc14.jar with current version of ojdbc6.jar (Thus I'm not experiencing problems with Dates holding time information)
5) Fire fitnesse - the startup script is a standard one - startFitnesse.sh:
#!/bin/sh
ROOT_DIR=`dirname $0`
cd ${ROOT_DIR}
java -jar fitnesse.jar -p 8980 -e 0 $1 $2 $3 $4 $5

# It's useful to run it with -d /target/folder. If you wish to benefit from new fitnesse features - it makes sense to point it to empty target first and sync your existing tests on top of it later.

6) In the content of my Suite I have following:
!path fitlibrary-2.0.jar
!path fitnesse.jar
!path lib/*.jar
!define TEST_RUNNER {fitlibrary.suite.FitLibraryServer}

(Probably would work if all jars are bunched in lib but for now I left fitnesse and fitlibrary outside since seems that was the default. The TEST_RUNNER part is critical to get things working).

7) In the SetUp of my Suite I have this:
!|fitlibrary.database.Oracle|
!|ConnectUsingFile|TestDBConnection.properties|


And all the rest works as it used to be in the standalone dbfit.

8) I have a "green" DummyTest like that:

!|Query| select 'test' as x from dual|
|x|
|test|

Regards,
Yavor
Reply all
Reply to author
Forward
0 new messages