Questions tagged [dbfit]

Questions related to DbFit, a framework for writing unit- and integration-tests for database code. It is based on FitNessese.

DbFit is a framework for writing unit- and integration- tests for database code, enabling developers to manipulate database objects in a relational form, making database TDD much easier then with xUnit-style tools. It is based on FitNessese (http://fitnesse.org).

Features

  • Regression testing for queries and SQL statements
  • Functional testing for stored procedures and functions
  • Automatic transaction control and various short-cuts to make writing test scripts easier and more efficient
  • Support for DB2, Oracle, SQL Server (java and .net versions), MySql 5 and Derby (only java)

Major Links

62 questions
4
votes
4 answers

Dbfit cannot find fixtures

I wrote the folowing test but am getting error: Could not find fixture: Connect. !path lib/*.jar !|Import| !|dbfit.SqlServerTest| !|Import| |dbfit.fixture| !|Connect|Data Source=ACER\SQLEXPRESS;Initial Catalog=NopCommerce;Integrated…
Ibexy I
  • 1,123
  • 6
  • 16
  • 29
4
votes
2 answers

How to get output of sql queries in FitNesse + DbFit?

I am trying to get sql query output in DBfit using i.e. !|Execute|select * from abc| but don't know how it will display in DBfit.
Ash
  • 41
  • 1
  • 2
3
votes
1 answer

How can I adjust the CommandTImeout in DbFit for long running queries?

Is there any way to increase the CommandTimeout for DbFit queries? I have a long running stored procedure that times out when running it in a DbFit Test. It's possible for the procedure to run for a really long time (processing millions of records)…
Ben Farmer
  • 695
  • 1
  • 6
  • 14
3
votes
3 answers

Fitnesse and dbFit: how to escape colons in SQL queries

I've a problem with escaping colons and dashes in SQL queries when I use dbFit with Fitnesse. Such statement doesn't work: !|Query|select to_char(my_birthday,'YYYY-MM-DD HH24:MI:SI') from family| I need to replace colons and dashes with some other…
Rarar
  • 419
  • 2
  • 6
  • 19
3
votes
1 answer

FitNesse value comparison fails even though the actual and expected is the same

I run a function in SQL Server that returns some calculated values. When testing the results in FitNesse using dbFit it claims that the values are not the same (see the screenshot below). The values are returned as floats and fails on the…
sduplooy
  • 14,340
  • 9
  • 41
  • 60
2
votes
1 answer

DbFit - Cannot work out how to run in Standalone Mode

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…
2
votes
2 answers

Way to assert dbfit test empty result is right

I am using dbfit and encounter a problem. A big part of the tests I am doing are querys that shouldn't return any results. But when I leave the result rows empty, and executing the test dbfit tells me that ther was zero right result and zero…
Nadav Nagel
  • 313
  • 1
  • 2
  • 8
2
votes
1 answer

The initial setup with DbFit not working

I am new to DbFit and Fitnesse using Version 2.0.0-RC5. I have followed the setup instructions exactly as followed on the github tutorial. I have tried many different ways to get it working but end up getting errors. The tutorial:…
Nexus
  • 71
  • 1
  • 8
2
votes
1 answer

SQLServerException while trying to use Fitnesse and DbFit and SQL Server

I am new to both (Java) FitNesse and SQL Server, I want to have a basic SQL test working with DbFit, I have the following in root: !path c:\fitnesse\lib\dbfit.jar !path c:\fitnesse\lib\fitlibrary.jar !path…
lingo_journey
  • 653
  • 1
  • 8
  • 22
1
vote
1 answer

insert xml data using dbfit

I'd like to insert some test xml data into a table before executing a stored proc that parses the xml and populates another table. Setup: Insert test data |execute|!- Insert into dbo.XML_Table Values ( '
Gilbert Liddell
  • 1,203
  • 4
  • 14
  • 21
1
vote
0 answers

Standalone mode exit

I want to have standalone mode and flow mode in the same suite but it shows error such as "Ambiguity between: fixture dbfit.fixture.ExecuteProcedure AND executeProcedure()". This is because standalone mode is getting executed and then flow…
rishabh
  • 21
  • 3
1
vote
1 answer

How to generate dynamic values in fitnesse

I have to insert incremental values in a column of the table using Fitnesse. The incremental value I'll get from a stored procedure which returns the last inserted value. So I have to increment the value and store it. For example: I'll get a value…
Benny
  • 432
  • 1
  • 6
  • 21
1
vote
1 answer

Pass values from fitnesse test data table to dbfit query

I want to get sql query which is to be passed in dbfit dynamically. I used columnfixture for this. I can set the query from my java fixture as variable in my fit test table but when I tried passing the same variable to dbfit it just consider that as…
Rajkumar
  • 189
  • 5
  • 19
1
vote
1 answer

Error running .Net and SQL tests in dbfit

I have a simple C# Column fixture class which independently tests fine. I have a sql server table which again, independently tests fine. If I test both, testing the SQL table first, again all is OK. However if I test the C# first, then the SQL test…
Tirinoarim
  • 624
  • 7
  • 14
1
vote
1 answer

MemberMissingException in FitSharp

When using a SUT in a DoFixture to explore its behaviour, the first call to a fixture-method succeeds but fails after invoking a SUT-method: public class ConfigurationCharacterization : fitlibrary.DoFixture { ConfigurationDelegator cd = new…
Thaoden
  • 3,460
  • 3
  • 33
  • 45
1
2 3 4 5