Fitnesse Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID fitnesse Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.9
Mar 25, 2014
1.420
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
timbacon (id: prime8)
Usage Installations 2013-Jun 694
2013-Jul 731
2013-Aug 718
2013-Sep 713
2013-Oct 757
2013-Nov 785
2013-Dec 766
2014-Jan 794
2014-Feb 784
2014-Mar 819
2014-Apr 841
2014-May 857

This plugin can be used to both execute and report on Fitnesse tests so that they can be integrated into a Jenkins build.
Contributions are welcome, both bug fixes and new features. Just raise a pull request via Github.

CI Server

Settings

  • Project settings in build step
    • For existing fitnesse instance: host/port
    • For new fitnesse instance: jvm args / Java working directory / path to fitnesse.jar / path to FitNesseRoot / port
    • Http timeout
    • Target page, results file name
  • Project settings in post-build step
    • Results file name
  • No global settings

Change Log

  • 1.8
  • 1.7
    • Avoid NPE when build aborts prematurely and produces no results (pull request)
    • Use the HTTP timeout inside the connection (pull request)
    •  Don't show broken image when no test results are available (pull request)
  • 1.6
    • Added support for multiple Fitnesse repoorts and drilling down into HTML output (pull request)
  • 1.5
    • Report exceptions as failures
    • Upgrade minimum Jenkins version from 1.353 to 1.401 to benefit from bug fixes in hudson.Proc
    • Added support for fitnesse options -d, -r & -p.
  • 1.4
    • Added ability to specify path to fitnesse.jar and path to FitNesseRoot relative to the workspace
  • 1.3.1
    • Fixed bug where counts with X right and Y ignores were being treated as ignored not right
  • 1.3
    • Added ability to specify http timeout (default: 60,000 ms)
    • Added ability to specify java working directory (default: location of fitnesse.jar)
    • Added page or suite name to build page summary link
  • 1.2
    • Added prettier tabular format for results
    • Results file without path will be written to / read from workspace
    • Log incremental console output as fitnesse results are coming in over HTTP
    • Fixed: Unable to unpack fitnesse.jar
    • Fixed: Build hangs when http get stalls
    • Fixed: Unexpected EOF while reading http bytes catch IOException
  • 1.1
    • Fixed: unable to parse xml with BOM: error "content is not allowed in prolog"
  • 1.0
    • Brand new

Todo...

  • Run fitnesse tests using "-c" option when starting new fitnesse instance
  • Add more control over fitnesse start-up params
  • Using glob to collect (potentially) multiple results.xml files
  • Add ProjectAction so that history graph appears on project's front page
  • Nest Sub-suites and tests-within-suites within the uber-parent FitnesseResults instance
  • Allow direct URL access to sub-suites and tests-within-suites so that every level can have its history graph
  • Run multiple test suites from one project configuration
  • ? Parse HTML output directly (since XML output gives so little useful info)
  • Check plugin in distributed and maven builds

Labels

plugin-report plugin-report Delete
plugin-builder plugin-builder Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 30, 2010

    Carsten Pfeiffer says:

    Thanks a lot for the fitnesse plugin! Would it be possible to add support fo...

    Thanks a lot for the fitnesse plugin! Would it be possible to add support for more than one fitnesse result file? Currently, it is only possible to specify a path to one result file. The other plugins for displaying testresults typically accept an ant path specification, e.g. something like testresults/**/fitnesse-*.xml.

    Thanks,
    Carsten

    1. Apr 21, 2010

      timbacon says:

      That would certainly be possible - I'm also curious as to where the multiple XML...

      That would certainly be possible - I'm also curious as to where the multiple XML files are coming from, can you help me to understand the scenario a bit more?

      Tim

      1. Apr 21, 2010

        Carsten Pfeiffer says:

        Cool, looking forward to that! The scenario is simply that we have multiple test...

        Cool, looking forward to that! The scenario is simply that we have multiple test suites that each produce their own results file. In other cases we are testing different variants and each variant results in one results file.

        Thanks,
        Carsten

  2. Apr 16, 2010

    prulli - says:

    How about a option where I can run FitNesse myself and have the plug-in only dea...

    How about a option where I can run FitNesse myself and have the plug-in only deal with the post build reporting stuff?

    thanks for the work!

    Paul

    1. Apr 21, 2010

      timbacon says:

      You can already do that - at the bottom of the project configuration page under ...

      You can already do that - at the bottom of the project configuration page under "Post-build options" select "Publish Fitnesse results report" and just point to the fitnesse XML results.

      HTH

  3. Apr 21, 2010

    Kevin Vranken says:

    I was wondering whether it was possible to edit the FitNesse startup parameters ...

    I was wondering whether it was possible to edit the FitNesse startup parameters ? You don't seem to have much control over them the way it is now, aside from the directory and the suite . Could a feature like that be added in the future.

    Thanks

  4. May 11, 2010

    Børge Haugsdal says:

    I really like the idea of a Hudson plugin rather using the maven fitnesse plugin...

    I really like the idea of a Hudson plugin rather using the maven fitnesse plugin, that we are using now in our project.
    But I have some suggestions for improvements, since we have a lot of test suites.
    What about making it easier to add new test suites running in the same environment (Host, port, and all are suites) ?
    Instead of having to add new build steps for each suite running in the same environment, could it be possible to add a list of tests to run within the same buildstep?
    The list of build steps can be quite long, and hard to edit.
    And as I can see it is only possible to view a single result file.

    I tried to specify the same result file for each suite hoping that each step should append to the same file, but is seems like each build step overwrites each other.
    What about letting the plugin decide the result file name for each test, and letting the Hudson plugin display all of them?

    Thanks
    Børge

    1. May 11, 2010

      timbacon says:

      Added to the backlog!

      Added to the backlog!

  5. Jul 26, 2010

    JP Erkelens says:

    How about the ability to use Hudson variables in the Suite name. This is a major...

    How about the ability to use Hudson variables in the Suite name. This is a major issue for me as I'd like to run a configuration matrix with different suites as an axis. However, since I cannot do this I have to manually call fitnesse -c and then parse the results myself.

  6. Aug 04, 2010

    Thang says:

    I'd like to second the idea of FitNesse startup parameters like "-e 0" or "-o" a...

    I'd like to second the idea of FitNesse startup parameters like "-e 0" or "-o" as we don't need to retain older versions or update from fitnesse server.

  7. Oct 13, 2010

    Michael Grant says:

    Having had a play with this plugin, I mostly like what I see with it, but there ...

    Having had a play with this plugin, I mostly like what I see with it, but there does seem to be one bug which limits its usefulness to me at present:  The test suite build only fails if there are failures in FitNesse; exceptions thrown in FitNesse do not cause the build to fail.

    1. Oct 13, 2010

      Michael Grant says:

      FWIW, I achieved the above result by adding the following to FitnesseResults.jav...

      FWIW, I achieved the above result by adding the following to FitnesseResults.java:

        public Result getBuildResult() {
           if (getFailCount() > 0 || getExceptionCount() > 0)
              return Result.FAILURE;
           else
              return null;
        }

      1. Sep 01, 2011

        Simon Westcott says:

        Do you know if this has been committed back to trunk?

        Do you know if this has been committed back to trunk?

  8. Dec 14, 2010

    Matthew Huang says:

    Hi, Dear Fitnesse plugin team. I really appreciate the cool thing you did. It'...

    Hi, Dear Fitnesse plugin team. I really appreciate the cool thing you did.

    It's easy to get this plugin work. I found one issue however, it's in the final report. There is link that links back to the Fitnesse test page. I have a Fitnesse page callsed "TestAutobuild" and therefore, I have a page like:
    __________________________________________________________________________________________
    0 failures
    1 tests
    Took 0 ms.
    add description
    Right: 1
    Name Right Wrong Ignored Exceptions
    TestAutobuilds.TestAutobuild 7 0 0 0
    __________________________________________________________________________________________

    where if I hove over the link for "TestAutobuilds.TestAutobuild" I see

    http//esbgftestrepo:8080/:8081/TestAutobuilds.TestAutobuild

    There are two problems in this link.

    First, there is no ":" symbol after http;

    Second, seems like the fitnesse plugin simply attached the port "8081" (since "8080" has been used by other app in my case) I specified portion after the existing hostname:port string with a forward slash in between.

    I am not sure if this is because I didn't configure the plugin correctly or a bug.

    Can you help?

    Thanks much,
    Matthew

  9. Jan 05, 2012

    Jan B says:

    I made some minor changes to the latest version by Si Westcott as our team wante...

    I made some minor changes to the latest version by Si Westcott as our team wanted to have the ability to pass additional command line arguments (like -o) to any new Fitnesse instance being fire up. 

    @Si Westcott; this took only some 30 min but if you are interested, send me a message and I will forward source.

    1. Jan 07, 2012

      Simon Westcott says:

      Hi Jan, send me a patch/pull request and I'll merge it in. Out of interest, do t...

      Hi Jan, send me a patch/pull request and I'll merge it in. Out of interest, do the unit tests on master work for you? HudsonDependentTest.testBuildStartingFitnesseWithAbsoluteAndRelativePaths just hangs on my laptop which made me hesitant to release 1.5.

  10. Feb 07, 2012

    William B says:

    When is 1.5 due out?  I could really use the fix for the exceptions registe...

    When is 1.5 due out?  I could really use the fix for the exceptions registering as failures.

    1. Feb 09, 2012

      Jan B says:

      Hi William, Simon Westcott forked this project on GitHub and added the functiona...

      Hi William, Simon Westcott forked this project on GitHub and added the functionality you require (if I am not misunderstanding your question). I recently added the ability to add additional parameters on the cmd line (like -o). Head over to https://github.com/instantkiwi/fitnesse-plugin to access my latest version. HTH

      1. Feb 10, 2012

        Simon Westcott says:

        Hi William, I've just uploaded a dev build to https://github.com/jenki...

        Hi William, I've just uploaded a dev build to https://github.com/jenkinsci/fitnesse-plugin/downloads which includes the feature you requested as well as Jan's patches and I've increased the minimum Jenkins version to 1.401 to benefit from core bug fixes in hudson.Proc. Would you be able to give this a test on your Jenkins install before general release?

  11. Feb 17, 2012

    Bruno CAPPOEN says:

    Hi everybody ! I have some troubles to configure the plugin.I have just the ...

    Hi everybody ! I have some troubles to configure the plugin.I have just the option "Publish Fitnesse results report" in configuration of my job. I don't find the other settings. (Hudson 1.440)

    I'm using the "fitnesse.junit.FitNesseSuite" and i don't know if it is compatible because i don't see xml files.

    Is it possible to have some explanations ? A mini tutorial ?

    Thanks much.

    1. Feb 18, 2012

      Simon Westcott says:

      Hi Bruno, click "Add build step" button and select "Execute fitnesse tests"

      Hi Bruno, click "Add build step" button and select "Execute fitnesse tests"

      1. Feb 18, 2012

        Bruno CAPPOEN says:

        Hi Simon, thanks ! I see the option now. Probably, i was tired yesterday......

        Hi Simon, thanks ! I see the option now. Probably, i was tired yesterday....

        I must launch fitnesse with that command :

        java  -cp "aether-fitnesse-widget.jar:fitnesse.jar" fitnesseMain.FitNesseMain -p 8082

        I'm using this widget : https://github.com/pascalleclercq/aether-fitnesse-widget

        So it seems that i can't use the command java -jar fitnesse.jar.

  12. Feb 20, 2012

    Carsten Pfeiffer says:

    Since I would really like to display the results of multiple suite results (see ...

    Since I would really like to display the results of multiple suite results (see here), I took the time to figure it out myself.

    I have a patched version that allows specifying a glob to the XML test result files, just like the JUnit plugin does. Now that there are multiple results, I made the test results nestable so that you can navigate from the toplevel entry down to the concrete results. To aid debugging of test failures, I added the html output that was created during the test run.

    The output looks like this:

    If you think this is a welcome addition, I'm happy to send you a patch or a git-format-patch or whatever you prefer.
    Thanks,

    Carsten

    1. Feb 20, 2012

      Simon Westcott says:

      Hi Carsten, That does indeed sound like a useful addition! I pull request i...

      Hi Carsten,

      That does indeed sound like a useful addition! I pull request including unit test updates via Github would be easiest from my point of view.

      Thanks,

      Si

    2. Feb 24, 2012

      Erik Swart says:

      I second Simon's comment - looking very forward to this!

      I second Simon's comment - looking very forward to this!

      1. Feb 24, 2012

        Carsten Pfeiffer says:

        Thanks. I've pushed the changes to https://github.com/cpfeiffer/fitnesse-pl...

        Thanks. I've pushed the changes to https://github.com/cpfeiffer/fitnesse-plugin if you want to testdrive them.

    3. Mar 05, 2012

      Erik Swart says:

      Hi Simon,  Is there any chance you can push an hpi of your plugin to your ...

      Hi Simon, 

      Is there any chance you can push an hpi of your plugin to your git branch? Having all sorts of issues with proxying/tunneling through our corporate network, and also trying to install it @ home. 

      Just the hpi and some SHA/MD5 sums would be great. 

      -Erik

  13. Feb 27, 2012

    Gerald Karpinski says:

    Hi Fitnesse plugin team, The plugin seems not to work in distributed environmen...

    Hi Fitnesse plugin team,

    The plugin seems not to work in distributed environment, because of 'localhost' in the source code make the requests from the plugin never reach the slaves nodes...

    i create a fix (mostly in FitnesseBuilder class, getFitnesseHost method and also FitnesseExecutor), i could send them if you would for testing and next release

    Gerald

    1. Mar 03, 2012

      Simon Westcott says:

      Hi Gerald, send me a pull request please (swestcott on github).

      Hi Gerald, send me a pull request please (swestcott on github).

      1. May 17, 2012

        James Dunlop says:

        Hi Simon, We are also experiencing this same problem when trying to run Jenkins...

        Hi Simon,

        We are also experiencing this same problem when trying to run Jenkins as a slave. Have these changes been pushed up? as we cannot see them there.

        Thanks,

        James

        1. May 18, 2012

          Simon Westcott says:

          Hi Gerald/James, I've merged this into master, but some tests are failing now. ...

          Hi Gerald/James,

          I've merged this into master, but some tests are failing now. See pull request for details.

          Thanks,

          Si

          1. Jun 19, 2012

            Alex Thomson says:

            Hi Simon, Is this change going to be made available in a release soon; I'd like...

            Hi Simon,

            Is this change going to be made available in a release soon; I'd like to start using the plugin in our jenkins environment?

            Thanks,

            Alex

            1. Jun 20, 2012

              James Dunlop says:

              We've had a go at compiling the code that is there currnetly and it has a couple...

              We've had a go at compiling the code that is there currnetly and it has a couple of issues.

              1. The 'Fitnesse Host' field is now always displayed as blank even after re-saving the configuration. The functionality still works, it's just the UI display of the field.

              2. The option to 'Start new Fitnesse instance as part of build' no longer works at all and it returns a null pointer exception error when running the job. (Both Local and Slave environments)

              However the tests now work a Jenkins Slave when Jenkins is running as a service :)

  14. May 08, 2012

    Cyril Lakech says:

    Hi, Is a release planned with last 2 months work? Because I think this commit ...

    Hi,

    Is a release planned with last 2 months work?

    Because I think this commit could avoid a NPE we get in most of our fitnesse test job: https://github.com/jenkinsci/fitnesse-plugin/commit/f9552c5dea5ff2a4eb93aaf6b0c1f8e6e39dd6f4

    We face a problem with this plugin when our suite are too big maybe because of a timeout problem or because of a result file too big problem or something else. We can't find why our small suite are OK but bigger one faced a NPE all the time.

    We use this plugin on a Jenkins hosted @ CloudBees.

    Please let us know.

    BR,

    Cyril

    1. May 18, 2012

      Simon Westcott says:

      Hi Cyril, 1.7 (released today) contains this patch. Thanks, Si

      Hi Cyril,

      1.7 (released today) contains this patch.

      Thanks,

      Si

  15. Jul 30, 2012

    bo sun says:

    Hi, Thanks very much for providing such a nice tool to run fitnesse tests. We u...

    Hi,

    Thanks very much for providing such a nice tool to run fitnesse tests. We used this plug-in on our CI server. It worked well except one thing.

    We met a time-out problem when trying to launch fitnesse. The waiting time for launching fitnesse is 10,000ms. However, on our server machine, launching fitnesse sometimes took about 20,000ms.

    So can I change the waiting time to a larger number to make sure that my fitnesse can successfully launched?

    Thanks!

  16. Aug 15, 2012

    Subhendu Mohapatra says:

    Hi, I have just started using the Fitnesse Plugin with Jenkins. Unfortunately ...

    Hi,

    I have just started using the Fitnesse Plugin with Jenkins.

    Unfortunately it does not work for me the way I would like to see it.

    I would appreciate any advice from users who are well versed with the configuration and how it works.

    I am executing Fitnesse Tests by calling Nant Build Target and then publishing the fitnesse results using the Fitnesse Plugin.

    The result that I see contains high level overview of the tests and tests that have passes / failed. 
    I am interested in seeing information on the tests (may be a link to display the test) and reasons why it failed.

    I could view the same with Cruise Control and I am pretty sure it must be possible with Jenkins as well. Something similar to this - 
    can anyone advice as to how do I get this.

    Also on a separate note, the reason why I am using Nant instead of calling Fitnesse within the jenkins is because I need to call the TestRunner.exe from Fitnesse. I am not sure as to how I could do that with the Fitnesse Plugin. Any advice on this will also be greatly appreciated.

    Thanks

    1. Aug 15, 2012

      Carsten Pfeiffer says:

      To get the detailed information, you need to make sure that the fitnesse XML out...

      To get the detailed information, you need to make sure that the fitnesse XML output is generated, but also the html output. The fitnesse plugin does this by adding "&format=xml&includehtml" to the URL.

      We're also calling FitNesse from ant using the <junit> task instead of letting Jenkins do this. The junit suites are then configured to be run with the FitNesseSuite, like this:

      @RunWith(FitNesseSuite.class)
      @Name("TrendFitnesse.ErpDemoTests")
      @FitnesseDir(".")
      @OutputDir(value ="", systemProperty = "TREND_HOME", pathExtension = "testresults")
      public class SuiteErpDemo {
      }
      

      We didn't find a commandline option to get both the XML and HTML output formats, so we had to add this to a fitnesse.responders.run.SuiteResponder (see its superclass TestResponder.createFormatterAndWriteHead()). We have our own subclass of SuiteResponder and have added these methods to get what we want:

      @Override
      protected void createFormatterAndWriteHead() throws Exception {
      	// must be before calling super, otherwise it will not be configured
      	// with e.g. the rootPath
      	addXMLOutputFileFormatter();
      	super.createFormatterAndWriteHead();
      }
      
      /**
        * Adds an output formatter that writes the FitNesse XML output to a file.
        * @throws Exception
        * @see {@link #getXMLOutputFile()}
        */
      private void addXMLOutputFileFormatter() throws Exception {
      	final String tempXmlOutputFile = getXMLOutputFile(page.getName());
      	if (tempXmlOutputFile == null) {
      		return;
      	}
      	
      	XmlFormatter.WriterFactory tempWriterFactory = new XmlFormatter.WriterFactory() {
      		@Override
      		public Writer getWriter(FitNesseContext context, WikiPage page, TestSummary counts, long time) throws Exception {
      			return new OutputStreamWriter(new FileOutputStream(tempXmlOutputFile), "UTF-8");
      		}
      	};
          formatters.add(new SuiteXmlFormatter(context, page, tempWriterFactory));
      }
      
      /**
        * Returns the fully qualified path to the file where the FitNesse XML output
        * shall be written to. The 
        * @param aSuiteName 
        * @return the full path to the output file, or <code>null</code> if no XML output shall be written
        */
      protected String getXMLOutputFile(String aSuiteName) {
      	String tempOutputFile = System.getProperty("trend.fitnesse.xmlOutputFilePath");
      	if (tempOutputFile == null) {
      		return null;
      	}
      	if (aSuiteName == null) {
      		throw new NullPointerException("aSuiteName must not be null");
      	}
      	
      	return tempOutputFile + aSuiteName + ".xml";
      }
      

      Hope this helps,
      Carsten

  17. Sep 04, 2012

    Michael Greco says:

    I'm not sure if I'm doing something wrong ... but I notice when I have Jenkins r...

    I'm not sure if I'm doing something wrong ... but I notice when I have Jenkins run my Fitnesse tests (using rubyslim) that stdout isn't logged anywhere. When I run the same tests directly from fitnesse, stdout is written to logs under the ErrorLogs directory. Not sure if I'm doing something wrong or if this is a request ...

    Thank You !

  18. Oct 04, 2012

    James Dunlop says:

    Hi Simon, Just wondering if any progress was made around the getting the plugin...

    Hi Simon,

    Just wondering if any progress was made around the getting the plugin to work with distributed environments? Last I heard the tests were still failing, has this change been included in the latest compiled version of the plugin, or still in need of fixing?

    Cheers

  19. Oct 05, 2012

    Sean Whyte says:

    When will 1.8 be released? I am waiting for Added support for Jenkins slaves.

    When will 1.8 be released? I am waiting for Added support for Jenkins slaves.

  20. Apr 08, 2013

    Bruno CAPPOEN says:

    Hi, is it possible to have the fix to issue JENKINS-17318 in the release ? ...

    Hi, is it possible to have the fix to issue JENKINS-17318 in the release ?

    I have another problem with jdk path. Seeing this code, my JAVA_HOME is now prefixed with a bin folder like : /bin/home2/jenkins/hudson.model.JDK/jdk1.6.0_32/bin/java

      if (envVars.containsKey("JAVA_HOME"))
          java = new File(new File(envVars.get("JAVA_HOME"), "bin"), java).getAbsolutePath();
         if(!builder.getFitnesseJdk().isEmpty()){
            File customJavaHome = Hudson.getInstance().getJDK(builder.getFitnesseJdk()).getBinDir();
           java = new File(customJavaHome, java).getAbsolutePath();
        }
    

    And I get an error : java.io.IOException: error=2, No such file or directory
    An idea to avoid that error ? A Value for builder.getFitnesseJdk() is always set in job config.I think, it's the same issue JENKINS-17318.

    Thanks.

  21. Aug 22, 2013

    Mike Guiney says:

    Hi, Thanks for this plugin! We are using it in our team and its extremely u...

    Hi,

    Thanks for this plugin! We are using it in our team and its extremely useful.

    One feature request for us would be to allow use of system params in job configuration.  See screen capture, which probably explains it best :) 

    We have many instance of jenkins running and monitoring different branches of source control (SCM). Each jenkins instance has an associated fitnesse server. We have a copy of the jenkins job configs stored in SCM and deploy this to each instance and update to point at correct fitnesse instance. We can store jenkins params, but I the plugin doesn't allow us to use them (i think?).

    Currently this is manually merged from branch to branch. Any suggestions/workarounds welcome.

    Thanks!

  22. Jun 05

    Yogesh Khandelwal says:

    curious to know, when is the next version coming up?  I'm looking for the b...

    curious to know, when is the next version coming up?  I'm looking for the below enhancement

    • Parse HTML output directly (since XML output gives so little useful info)
    •  Using glob to collect (potentially) multiple results.xml files
    •  Nest Sub-suites and tests-within-suites within the uber-parent FitnesseResults instance
    •  Allow direct URL access to sub-suites and tests-within-suites so that every level can have its history graph
    •  Run multiple test suites from one project configuration

    Thanks,
    Yogesh

  23. Jul 01

    Frédéric Ogerau says:

    Hello, It would be nice to have the possibility to set user and password when a...

    Hello,

    It would be nice to have the possibility to set user and password when accessing a protected Fitnesse server

    Thanks

    Fred