FitNesse

Version: 1.34Minimum Jenkins requirement: 2.60.1ID: fitnesse
Installs: 908
Last released:
Maintainers
timbacon
jaruzafa

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

Configuration

Global

  • You could define a JDK installation (not mandatory). All JDKs will be available in the job configuration.

Agent node

  • If your job runs on a remote node and launches FitNesse, you should add the HOST_NAME environment variable in the node configuration and set its value to the node’s hostname or IP. You can name it as fitnesse.yourdomain.com (whatever you like). This environment variable will be used when you set up the fitnesse instance below (it will replace localhost by the content of HOST_NAME).

Note: If you have the EnvInject plugin installed, Environment variables configured like in the image will not work. Use the EnvInject way instead. You will notice this by fitnesse still trying to connect to localhost, instead of the content in HOST_NAME.

  • You could also override JDK location used, by set a Tool location:

or by overridden JAVA_HOME environment variable.

Usage

Project settings in build step

  • For existing FitNesse instance: host and port where FitNesse is running

  • For new FitNesse instance:
    • JDK: selected JDK, JVM args and Java working directory
    • Paths: fitnesse.jar and FitNesseRoot path
    • Fitnesse: port use and command line args

  • In all cases:
    • Target page
    • HTTP and test timeout
    • Results file name

Project settings in post-build step

  • Results file name: the name of the result file ; if there is several files, you can use wildcards.

Result

  • On project page : a new chart with result trend and a little summary

  • All tests result in a page:

  • And finally, captured details of a test:

Pipeline

The plugin supports pipeline the following way:

Run your tests

With some sample values, this step looks like this:

step([ $class: 'FitnesseBuilder',
        options: [
        fitnessePathToRoot: "",
        additionalFitnesseOptions: "-v",  // -v for verbose
        fitnesseTestTimeout: '',
        fitnesseStart: 'true',
        fitnesseHttpTimeout: '',
        fitnesseTargetIsSuite: "true/false",
        fitnesseJavaOpts: '',
        fitnessePathToJar: "/opt/var/fitnesse/lib/fitnesse-20180127-standalone.jar",
        fitnesseTargetPage: "suiteMyTestSuite",
        fitnessePathToXmlResultsOut: 'fitnesse-results.xml',
        fitnessePathToJunitResultsOut: 'fitnesse-junit-results.xml',
        fitnessePortLocal: '8083',
        fitnesseJavaWorkingDirectory: "/opt/var/fitnesse/lib/"
      ]])

Render results

step([ $class: 'FitnesseResultsRecorder',
        fitnessePathToXmlResultsIn: 'fitnesse-results.xml'
])

Todo

  • (star) Run fitnesse tests using "-c" option when starting new fitnesse instance
  • (star) Add more control over fitnesse start-up params
  • (star) Using glob to collect (potentially) multiple results.xml files
  • (star) Nest Sub-suites and tests-within-suites within the uber-parent FitnesseResults instance
  • (star) Allow direct URL access to sub-suites and tests-within-suites so that every level can have its history graph
  • (star) Run multiple test suites from one project configuration

Build Status

Change Log

Older versions of this plugin may not be safe to use. Please review the following changelog before using an older version:

  • 1.33 (2020-04-04)
  • 1.31 (2020-02-12)
  • 1.30 (2019-09-19)
    • Fixed: JENKINS-58923 Cannot browse result of tests when publishing several fitnesse result files on Windows
    • Fixed: JENKINS-58430 Publishing two fitnesse xml files with same test name confuses the results
    • Removed some log warnings
  • 1.29 (2019-08-11)
    • (plus) Added: Changes to read and write results in distributed Jenkins (PR-37) (Fixes:  Fitnesse should run on the agent of the build, not on the master node  JENKINS-13696)
  • **1.28 **(2019-01-12)
    • (plus) Added: Produces junit report results from the fitnesse results (PR-36)
  • **1.27 **(2018-12-20)
    • (thumbs up) Fixed: FitNesse history is not rendering on builds generated by latest plugin versions
  • 1.25 (2018-12-05)
    • (thumbs up) Fixed: FitNesse history not rendering in some cases
  • 1.24 (2018-11-08)
    • **(plus) **Added: Support for remote FitNesse over HTTPS  (PR-27)
    • (plus) Added: Add environment variables support for fitnesse hostname and port (PR-28)
    • (plus) Added: Feature/pipeline compatibility (PR-30)
    • (plus) Improvement: Try to gracefully terminate the running test in case of an exception (PR-31)
    • (plus) Added: Ability to access to a protected remote Fitnesse (PR-32)
    • (thumbs up) Fixed: Fixes for JEP-200 (PR-35)
  • 1.16 (2015-06-26)
    • (thumbs up) Fixed FitNesse 1.13 does not render properly FitNesse history (JENKINS-29019)
  • 1.15 (2015-06-22)
    • (plus) Improvement: Add ability to define fitnesse port as enironment variable (JENKINS-27955)
    • (thumbs up) Fixed: FitNesse History doesn't render properly (JENKINS-29019)
    • (thumbs up) Clean code: remove useless library, remove warnings and deprecated methods
  • 1.14 (2015-06-21)
    • (thumbs up) Fixed: In result detail page, can't expand collapsed scenario (JENKINS-27938)
    • (thumbs up) Fixed: manage JDK 1.8 (increase core plugin version)
    • (thumbs up) Fixed: manage severals FitNesse test results in the same job (JENKINS-27936 - pull request)
  • 1.13 (2015-06-02)
    • (thumbs up) Fixed: manage FitNesse old versions (without summary and page duration fields in XML result) (JENKINS-28316)
    • (plus) Improve FitNesse History page: reverse column order & add sort on column header
    • (thumbs up) Fixed: use FitNesse plugin with contionnal steps(multiple) plugin (JENKINS-21636)
  • 1.12 (2015-03-31)
    • (plus) Improve captured detail renderer (use FitNesse CSS & JS)
    • (plus) Added: FitNesse tests history page (pull request)
    • (thumbs up) Fixed: execution of test page (pull request)
  • 1.11 (2014-11-10)
    • (thumbs up) Improve result table and captured detail renderer (pull request)
  • 1.10 (2014-10-27)
    • (thumbs up) Fixed: avoid OOM on hudge result files (pull request)
    • (thumbs up) Fixed: support Jenkins agent with a different OS than master's one (pull request)
    • (thumbs up) Fixed: avoid NPE when no JDK is defined in global configuration (pull request)
    • (plus) Added: retrieve and display duration for all tests (pull request)
    • (thumbs up) Fixed: test port availability to check if FitNesse is started instead of scraping stdout (pull request)
  • 1.9 (2014-03-26)
    • (thumbs up) Fixed: launch FitNesse if no JDK is configured in Jenkins (pull request)
    • (thumbs up) Improve performance on huge result file (pull request)
  • 1.8 (2013-10-21)
  • 1.7
    • (thumbs up) Fixed: avoid NPE when build aborts prematurely and produces no results (pull request)
    • (thumbs up) Use the HTTP timeout inside the connection (pull request)
    • (thumbs up) Don't show broken image when no test results are available (pull request)
  • 1.6
    • (plus) Added support for multiple FitNesse reports and drilling down into HTML output (pull request)
  • 1.5
    • (thumbs up) Report exceptions as failures
    • (thumbs up) Upgrade minimum Jenkins version from 1.353 to 1.401 to benefit from bug fixes in hudson.Proc
    • (plus) Added support for FitNesse options -d, -r & -p.
  • 1.4
    • (plus) Added ability to specify path to fitnesse.jar and path to FitNesseRoot relative to the workspace
  • 1.3.1
    • (thumbs up) Fixed bug where counts with X right and Y ignores were being treated as ignored not right
  • 1.3
    • (plus) Added ability to specify HTTP timeout (default: 60,000 ms)
    • (plus) Added ability to specify java working directory (default: location of fitnesse.jar)
    • (plus) Added page or suite name to build page summary link
  • 1.2
    • (plus) Added prettier tabular format for results
    • (plus) Results file without path will be written to / read from workspace
    • (plus) Log incremental console output as FitNesse results are coming in over HTTP
    • (thumbs up) Fixed: Unable to unpack fitnesse.jar
    • (thumbs up) Fixed: Build hangs when http get stalls
    • (thumbs up) Fixed: Unexpected EOF while reading http bytes catch IOException
  • 1.1
    • (thumbs up) Fixed: unable to parse xml with BOM: error "content is not allowed in prolog"
  • 1.0
    • (plus) Brand new (smile)
ArchivesGet past versions
Links
Labels

Previous Security Warnings