How can I run FitNesse tests from Eclipse IDE? I was trying to use jUnit Runner. I want to know the steps to implement the runner class and execute FitNesse tests.
Asked
Active
Viewed 1,288 times
1 Answers
2
Does the unit test from the project help? The Suite
annotation defines which tests to run.
@RunWith(FitNesseRunner.class)
@FitNesseRunner.Suite("FitNesse.SuiteAcceptanceTests.SuiteSlimTests.TestScriptTable")
@FitNesseRunner.FitnesseDir(".")
@FitNesseRunner.OutputDir("./build/fitnesse-results")
public class FitNesseRunnerTest {
}

Fried Hoeben
- 3,247
- 16
- 14
-
Where am I suppose to find my test pages in FitNesseRoot directory? My FitNesseRunnerTest executed successfully. It created FitNesse.SuiteAcceptanceTests.SuiteSlimTests.TestScriptTable.html in OutputDir. But I don't see my tests being executed. I just want to run my test page. I tried complete url of the page but it throws an error "No page found" – P.K Jul 01 '16 at 22:16
-
1Have you tried the complete URL of your page, or did you strip 'http://localhost:
/' prefix? The latter is what should have worked. So if http://localhost/MySuite.MyTest is the url you enter `Suite("MySuite.MyTest")` – Fried Hoeben Jul 02 '16 at 05:03 -
MySuite.MyTest was the catch. Thanks for the suggestion. I see an HTML page is being generated in OutputDir, after running the FitNesseRunnerTest. Is that it? Also, can I use FitNesseRunner in continuous integration tools such as Jenkins to run my FitNesse tests. – P.K Jul 06 '16 at 21:25
-
For each test executed a HTML page will be generated, and a single overview page. – Fried Hoeben Jul 08 '16 at 09:51
-
I use this to run my tests on build servers such as Jenkins. I create a job that runs a unit test (using maven failsafe plugin), see https://github.com/fhoeben/hsac-fitnesse-fixtures/wiki#2-run-on-build-server and https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/master/pom.xml and – Fried Hoeben Jul 08 '16 at 09:53
-
Thanks a lot. That's really helpful. Also, how can you add more test cases to the FitNesse suite? So after creating the job and running the tests on the build servers, is it possible to go to the wiki web page (test page) and add some more tests cases to the wiki page, on the build server? – P.K Jul 20 '16 at 21:51
-
To add more tests, or change existing ones, I just change the wiki pages (below/inside the suite the build server runs) on my local machine, commit the changes and the build server picks these changes up automatically (it polls version management, detects the changes I made, updates its workspace and runs the job again). – Fried Hoeben Jul 21 '16 at 06:46