Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run tests in FitNesse/Slim headless?

we are considering to use FitNesse/Slim.

But is there a way to start all written Tests without browsing the webpage and starting each manually ?

It would be sufficient if there is a one-start-all kind of button somewhere to click.

So either starting all tests from command line (with a report of course) or with on button from the webpage.

Is this doable ?

Thanks in advance

like image 306
Emerson Avatar asked Aug 12 '11 11:08

Emerson


2 Answers

There is a very easy way to do that. You can run FitNesse tests from the command line. You do this by using the following command line:

java -jar lib/fitnesse.jar -c "FrontPage?suite&format=text" 

This will run all tests under the FrontPage and show the results as they happen in a command line friendly format. If you change FrontPage to FrontPage.MainSuite, it will run only the tests under that page.

If you have tests that are in different states. Maybe some of them are started but are not done yet. You can add a Suite Tag to the tests that must run, then you can filter the tests that are run. that would look like the following:

java -jar lib/fitnesse.jar -c "FrontPage?suite&suiteFilter=MustBeGreen&format=text" 

This is also possible to do using an ANT java task.

Assuming you have a current version of fitnesse and have it running on port 8080, the following link will take you to a page with more details: http://localhost:8080/FitNesse.UserGuide.ControllingFitnesseFromTheCommandLine

like image 152
Dan Woodward Avatar answered Sep 23 '22 14:09

Dan Woodward


Dan has it correct; but the User Guide is also posted online at:

http://fitnesse.org/FitNesse.UserGuide.ControllingFitNesseFromTheCommandLine

like image 31
erich z Avatar answered Sep 22 '22 14:09

erich z