How to run tests in FitNesse/Slim headless?
Asked Answered
W

2

5

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

Weisler answered 12/8, 2011 at 11:9 Comment(0)
H
13

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

Hollerman answered 12/8, 2011 at 17:37 Comment(0)
H
3

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

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

Hymenium answered 17/8, 2011 at 22:38 Comment(4)
I wanted to link to that, but references the old test runner. I'm pretty sure with the current release of FitNesse, that doesn't work. Unfortunately the site doesn't always reflect the version of the user guide that comes with FitNesse.Hollerman
Oh. I see now you are right. The page still isn't a match for the UserGuide. I hope to do something about that.Hollerman
@Dan - thanks, I hadn't considered that aspect. The docs for your own install will be more up-to-date than the generic web page.Hymenium
the link is dead (end of 2017)Samy

© 2022 - 2024 — McMap. All rights reserved.