Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to parametrize Maven surefire plugin so I can choose which TestNG suites to run
    primarykey
    data
    text
    <p>I've got many test suites in TestNG. These are XML files. I want to be able to choose multiple XML suites when running integration-test from maven.</p> <p>Currently I can add the suite files to pom.xml like this:</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;configuration&gt; &lt;suiteXmlFiles&gt; &lt;suiteXmlFile&gt;${pathToMySuiteFile_1}&lt;/suiteXmlFile&gt; &lt;suiteXmlFile&gt;${pathToMySuiteFile_1}&lt;/suiteXmlFile&gt; &lt;/suiteXmlFiles&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>This solution has some limitations. I can only change a path to the test suite I've got defined in pom.xml. So in my example it always has to be two files. I'm not able to run, lets say, 5 suites or just one.</p> <p>Is there a way to somehow parametrize the whole section "suiteXmlFiles" in pom.xml ?</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;configuration&gt; &lt;suiteXmlFiles&gt; ${multiple_paths_ToMySuiteFiles} &lt;/suiteXmlFiles&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>Running everything that matches given test group is not an option for me: I don't want to load all the suites I've got and then run just the selected tests using groups in TestNG suite. The reason being that a report that gets generated after running all the test suites with group filters is different from a report when just the selected test suites were run.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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