Hi Philippe,

Below is a patch which does this. It appears to work for me. I see that Mike Grayson has created a new issue (MFITNESSE-28) but I'm a bit new to maven and codehaus. Perhaps you can tell me
what I should do next.

Nick

Philippe Kernévez wrote:
Hi Nick,

It would be nice to add this feature.
This isn't use at this time because I never use it (I didn't know it).
If you propose a patch I would be happy to applied it, else I should look at
this feature but it should take more time...

Regards,
Philippe


-----Original Message-----
From: Nick Roberts [mailto:[email protected]] Sent: jeudi 18 décembre 2008 02:38
To: [email protected]
Subject: [mojo-dev] FitNesse Maven plugin

I am trying to use the FitNesse Maven plugin within the continuous
build tool, Hudson.  The class, fitnesse.runner.TestRunner, which the
plugin invokes has an option called "-suiteFilter" which is useful as I
can mark only those tests that I want to run in Hudson (in their
properties page).  Unfortunately, there doesn't appear to be the
possibility to add this option within the plugin.

Would it be possible to add an optional parameter to the plugin?, eg,

Name             Type           Description

suiteFilter String Only execute Fitnesse tests that are marked with this keyword in the field labeled
                                          "Suites" of their property page.



Index: src/main/java/org/codehaus/mojo/fitnesse/FitnesseRunnerMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/fitnesse/FitnesseRunnerMojo.java (revision 8361) +++ src/main/java/org/codehaus/mojo/fitnesse/FitnesseRunnerMojo.java (working copy)
@@ -232,6 +232,13 @@
    private List classPathSubstitutions = new ArrayList();

    /**
+     * Fitnesse suiteFilter option
+     *
+     * @parameter  default-value=""
+     */
+    private String suiteFilter;
+
+    /**
     * Command for the execution of the FitRunner
     */
    private FCommandline mCmd = new FCommandline();
@@ -704,6 +711,13 @@
        }
        mCmd.createArgument().setValue( tFileName );
        mCmd.createArgument().setValue( "-nopath" );
+
+        if ( suiteFilter != null && suiteFilter.length() > 0 )
+        {
+        mCmd.createArgument().setValue( "-suiteFilter" );
+        mCmd.createArgument().setValue( suiteFilter );
+    }
+
        mCmd.createArgument().setValue( pServer.getHostName() );

        mCmd.createArgument().setValue( "" + pServer.getPort() );
@@ -777,6 +791,16 @@
    /**
     * Accessor.
     *
+ * @param suiteFilter The suiteFilter option to use when runinng fitnesse tests.
+     */
+    void setSuiteFilter( String suiteFilter )
+    {
+        this.suiteFilter = suiteFilter;
+    }
+
+    /**
+     * Accessor.
+     *
     * @param pluginArtifacts The Maven resource.
     */
    public void setPluginArtifacts( List pluginArtifacts )



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to