Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fitnesse- Should tests talk to the database?

We are trying to use Fitnesse for our Functional test. Should i be mocking dependencies or should it be testing against the database?

What are the Pros/Cons of either of the approach?

The whole issue of testing against the DB is setting up data which is huge dependency. If we mock then is it real functional test?

Thanks

like image 670
Naveen Avatar asked Jan 25 '10 18:01

Naveen


People also ask

Is FitNesse a testing method?

FitNesse is a web server, a wiki and an automated testing tool for software. It is based on Ward Cunningham's Framework for Integrated Test and is designed to support acceptance testing rather than unit testing in that it facilitates detailed readable description of system function.

What table can be used to perform series of actions in FitNesse?

Script table is a series of actions and checks that are similar to Do Fixture. The first row of script table starts with word “Script” followed by the name of the fixture (known as the “actor”) and it's constructor arguments that will be used by the rest of the table.

What is the syntax to set the path in FitNesse page?

'' variable defined: PagePATH=''! -PagePath-! ''


1 Answers

We have a full set of end to end functional tests that run in fitnesse in two modes: "InMemory" and "Database", Depending on which configuration to run the tests in dictates which repositories the tests use. This has several advantages:

1) It keeps the developers from building a lot of functionality into the database and keeps in in the code.

2) When "In-Memory" the fitnesse tests run very very fast. Allowing the tests to fail very very fast...and thus speed up development and agility. When they run in db mode only they do take some time.

like image 188
ryber Avatar answered Oct 04 '22 10:10

ryber