OK, I'm still a newbie to DBFit. I have downloaded the files from here: Dbfit download page
and run startFitnesse.bat
The following in Flow Mode works perfectly:
!path lib/*.jar
!|dbfit.SqlServerTest|
!|Connect|jdbc:sqlserver://10.19.135.119;databaseName=DbFit_Temp;user=dbfittemp;password=dbfittemp|
!|insert|MyTable|
|field1 |
|yyy|
!|Query| select * from MyTable|
|field1|
|yyy|
So when I try the following to test Standalone Mode according to this link:
!path lib/*.jar
!|import|
|dbfit.fixture|
!|DatabaseEnvironment|sqlserver|
!|Connect|jdbc:sqlserver://10.19.135.119;databaseName=DbFit_Temp;user=dbfittemp;password=dbfittemp|
!|insert|MyTable|
|field1 |
|yyy|
!|Query| select * from MyTable|
|field1|
|yyy|
I get the following error: "Could not find fixture: import."
I've googled around and can't find a complete example to show me how to run DbFit in Standalone Mode....please help!
I worked out the problem after I saw this example
The syntax for the Import should be:
!|import fixture|
|dbfit.fixture|
The documentation I've seen doesn't seem to show that however...
来源:https://stackoverflow.com/questions/21129739/dbfit-cannot-work-out-how-to-run-in-standalone-mode