Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>We also hit this issue with our tests. The current workaround that we use now is to define a property variable in the property section and inject it in sure-fire suiteXmlFiles block.</p> <pre><code>&lt;properties&gt; &lt;!-- Default suites --&gt; &lt;batsSuiteFile&gt;${project.build.testOutputDirectory}/BatsTests.xml&lt;/batsSuiteFile&gt; &lt;smokeSuiteFile&gt;${project.build.testOutputDirectory}/SmokeTests.xml&lt;/smokeSuiteFile&gt; &lt;!-- Default suite files if not being specified from mvn command line --&gt; &lt;defaultSuiteFiles&gt;${batsSuiteFile},${smokeSuiteFile}&lt;/defaultSuiteFiles&gt; &lt;suiteFile&gt;${defaultSuiteFiles}&lt;/suiteFile&gt; &lt;/properties&gt; </code></pre> <p>Then in the plugin section...</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;version&gt;2.12&lt;/version&gt; &lt;configuration&gt; &lt;suiteXmlFiles&gt; &lt;!-- Suite file injection parameter from command line --&gt; &lt;suiteXmlFile&gt;${suiteFile}&lt;/suiteXmlFile&gt; &lt;/suiteXmlFiles&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>If nothing is specified from the command line it will fall back and default to the 2 suites specified above in the properties section. Then if you want to kick off a specified set of suite files you can do:</p> <pre><code>mvn test -DsuiteFile=test1.xml,test2.xml </code></pre> <p>Surprisingly from the maven docs you expect that the arg suiteXmlFiles should just override this from the command line and should just accept a comma delimited list of testng xmls <a href="http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#suiteXmlFiles" rel="nofollow">http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#suiteXmlFiles</a></p> <p>If anyone has any other better way please share.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload