akatie / fitnesse-launcher-maven-plugin

Automatically exported from code.google.com/p/fitnesse-launcher-maven-plugin
0 stars 1 forks source link

Command line parameters should override settings in configuration section #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Specify a suite to be executed in <configuration> section of POM (e.g. 
<suite>FirstSuite</suite>
2. Try to override this setting with specifying command line parameter, e.g. 
-Dfitnesse.suite=SecondSuite
3. Observe that FirstSuite is executed instead of SecondSuite

What is the expected output? What do you see instead?

Expected output is for command line settings to take precedence over whatever 
is defined in POM

What version of the product are you using? On what operating system?

v.1.2.2 both Windows and Linux

Please provide any additional information below.

Original issue reported on code.google.com by krzyszto...@gmail.com on 12 Jul 2013 at 10:03

GoogleCodeExporter commented 8 years ago
I've just tested this, and the command line setting for 'fitnesse.suite' only 
works if the pom.xml omits the <suite> config.

However, the property does get passed in, so it would be feasible to do the 
override manually. (I would have expected Maven to take care of this for me, to 
be honest :-)

Original comment by stewart@javahelp.co.uk on 16 Jul 2013 at 12:46

GoogleCodeExporter commented 8 years ago
Sonatype documentation on how Maven plugin configs work.

http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-mojo-params
.html

It looks like, instead of specifying <suite>MyTestSuite</suite> inside the 
<configuration>,
if you specify the config in the <properties> section of pom.xml as:
<fitnesse.suite>MyTestSuite</fitnesse.suite>
then this opens up the property to being overridden by -D on the command line,
whereas if you do it via <configuration> in the plugin, then nothing can 
override it.

If this is the normal / expected Maven behaviour of plugins, I prefer to keep 
it that way. But I will update the documentation to explain this, using the 
Sonatype reference above.

Original comment by stewart@javahelp.co.uk on 23 Jun 2014 at 3:44

GoogleCodeExporter commented 8 years ago
For Issue #17, there will be a new config style which will allow multiple 
top-level Test Suites to be run during run-tests goal:
<launches>
   <launch>
        <suite>FirstTestSuite</suite>
        <suiteFilter>tag1,tag2</suiteFilter>
    </launch>
    <launch>
        <suite>SecondTestSuite</suite>
        <excludeSuiteFilter>tag1,tag2</excludeSuiteFilter>
    </launch>
</launches>

Pre-1.4.0 config will still work, and in fact will be senior to this config, as 
that will then allow ad hoc overriding of Suites on command line using 
-Dfitnesse.suite=X or -Dfitnesse.test=Y

Original comment by stewart@javahelp.co.uk on 1 Jul 2014 at 12:42

GoogleCodeExporter commented 8 years ago
Added documentation to FAQ's, as well as main usage docs.
http://fitnesse-launcher-maven-plugin.googlecode.com/svn/maven/site/fitnesse-lau
ncher-maven-plugin/faq.html#commandline
http://fitnesse-launcher-maven-plugin.googlecode.com/svn/maven/site/fitnesse-lau
ncher-maven-plugin/filtering.html#Configuring_Which_Suites_Or_Tests_To_Run

Original comment by stewart@javahelp.co.uk on 8 Jul 2014 at 10:46