Class ExecuteFitnesseTestsTask

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class ExecuteFitnesseTestsTask
    extends org.apache.tools.ant.Task
    Task to run fit tests. This task runs fitnesse tests and publishes the results.
     Usage:
     <taskdef name="execute-fitnesse-tests"
         classname="fitnesse.ant.ExecuteFitnesseTestsTask"
         classpathref="classpath" />
     OR
     <taskdef classpathref="classpath"
                 resource="tasks.properties" />
    
     <execute-fitnesse-tests
         suitepage="FitNesse.SuiteAcceptanceTests"
         fitnesseport="8082"
         resultsdir="${results.dir}"
         resultshtmlpage="fit-results.html"
         classpathref="classpath" />
     
    • Field Summary

      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.tools.ant.types.Path createClasspath()  
      void execute()  
      void setClasspath​(org.apache.tools.ant.types.Path classpath)
      Set Classpath of the TestRunner class.
      void setClasspathRef​(org.apache.tools.ant.types.Reference r)  
      void setDebug​(boolean debug)
      Set debug mode.
      void setFailOnError​(boolean failOnError)
      Enable or disable to fail the build if any Fitnesse tests fail.
      void setFitnesseHost​(java.lang.String fitnesseHost)
      Set host address on which Fitnesse is running.
      void setFitnessePort​(int fitnessePort)
      Set port on which fitnesse would run.
      void setResultProperty​(java.lang.String resultProperty)
      Set name of the property which will store the test results.
      void setResultsDir​(java.lang.String resultsDir)
      Set the path to the folder that will contain the fitnesse results page after execution.
      void setResultsHTMLPage​(java.lang.String resultsHTMLPage)
      Set the filename for storing the results in HTML format If set, stores the fitnesse results in HTML format under the resultsdir folder with the given name.
      void setResultsXMLPage​(java.lang.String resultsXMLPage)
      Set the filename for storing the results in XML format If set, stores the fitnesse results in XML format under the resultsdir folder with the given name.
      void setSuiteFilter​(java.lang.String suiteFilter)
      Set name of the filter to be passed to TestRunner to specify a subset of tests to run.
      void setSuitePage​(java.lang.String suitePage)
      Set the partial URL of the wiki page which is declared as a Suite.
      void setTestRunnerClass​(java.lang.String runnerClass)
      Set the fully qualifies class name of the fitnesse testrunner class.
      void setVerbose​(boolean verbose)
      Set verbose mode.
      • Methods inherited from class org.apache.tools.ant.Task

        bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExecuteFitnesseTestsTask

        public ExecuteFitnesseTestsTask()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException
      • setFitnesseHost

        public void setFitnesseHost​(java.lang.String fitnesseHost)
        Set host address on which Fitnesse is running. Defaults to 'localhost'.
        Parameters:
        fitnesseHost - host address on which Fitnesse is running
      • setClasspath

        public void setClasspath​(org.apache.tools.ant.types.Path classpath)
        Set Classpath of the TestRunner class. MUST SET
        Parameters:
        classpath - Classpath of the TestRunner class
      • setSuiteFilter

        public void setSuiteFilter​(java.lang.String suiteFilter)
        Set name of the filter to be passed to TestRunner to specify a subset of tests to run.
        Parameters:
        suiteFilter - name of the filter to be passed to TestRunner for filtering
      • setDebug

        public void setDebug​(boolean debug)
        Set debug mode. Defaults to 'true'.
        Parameters:
        debug - enable or disable debug mode
      • setFailOnError

        public void setFailOnError​(boolean failOnError)
        Enable or disable to fail the build if any Fitnesse tests fail. Defaults to 'true'.
        Parameters:
        failOnError - Enable or disable to fail the build if any Fitnesse tests fail
      • setFitnessePort

        public void setFitnessePort​(int fitnessePort)
        Set port on which fitnesse would run. MUST SET..
        Parameters:
        fitnessePort - port on which fitnesse would run
      • setResultProperty

        public void setResultProperty​(java.lang.String resultProperty)
        Set name of the property which will store the test results. Only valid if failOnError attribute is set to false.
        Parameters:
        resultProperty - name of the property which will store the test results
      • setResultsDir

        public void setResultsDir​(java.lang.String resultsDir)
        Set the path to the folder that will contain the fitnesse results page after execution. Only valid if resultsHTMLPage or resultsXMLPage attributes are set. Defaults to current directory.
        Parameters:
        resultsDir - path to the folder that will contain the fitnesse results page after execution.
      • setResultsHTMLPage

        public void setResultsHTMLPage​(java.lang.String resultsHTMLPage)
        Set the filename for storing the results in HTML format If set, stores the fitnesse results in HTML format under the resultsdir folder with the given name. The file name must have a '.html' extension.
        Parameters:
        resultsHTMLPage - set the filename for storing the results in HTML format
      • setResultsXMLPage

        public void setResultsXMLPage​(java.lang.String resultsXMLPage)
        Set the filename for storing the results in XML format If set, stores the fitnesse results in XML format under the resultsdir folder with the given name. The file name must have a '.xml' extension.
        Parameters:
        resultsXMLPage - set the filename for storing the results in XML format
      • setTestRunnerClass

        public void setTestRunnerClass​(java.lang.String runnerClass)
        Set the fully qualifies class name of the fitnesse testrunner class. Defaults to 'fitnesse.runner.TestRunner'.
        Parameters:
        runnerClass - Fully qualifies class name of the fitnesse testrunner class
      • setSuitePage

        public void setSuitePage​(java.lang.String suitePage)
        Set the partial URL of the wiki page which is declared as a Suite. Ex: FrontPage.SmokeTest, FitNesse.SuiteAcceptanceTests, or FitNesse.AcceptanceTestsSuite. MUST SET.
        Parameters:
        suitePage - partial URL of the wiki page which is declared as a Suite
      • setVerbose

        public void setVerbose​(boolean verbose)
        Set verbose mode. Defaults to 'true'.
        Parameters:
        verbose - verbose mode
      • createClasspath

        public org.apache.tools.ant.types.Path createClasspath()
      • setClasspathRef

        public void setClasspathRef​(org.apache.tools.ant.types.Reference r)