Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to run a parameterized suite file from command line using maven
    primarykey
    data
    text
    <p>I am trying to find out how to run a parameterized suite file from command line using maven. I am using IntelliJ to write my webdriver tests and in that IDE I just right click on the suite file and click run xml which sends the parameters in the suite file to my base class which all of my test cases extend and then it runs my tests. Is there a way to run the same parameterized suite file from command-line. I use this command to run a suite-file from command-line</p> <pre><code> mvn test -Dtests=resources/test-suites/audioSuite.xml &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt; &lt;suite name="Image Upload Suite Firefox" verbose="1" &gt; &lt;test name="Image Upload Test" parallel="false"&gt; &lt;parameter name="BROWSER" value="FF" /&gt; &lt;parameter name="VERSION" value="20" /&gt; &lt;parameter name="PLATFORM" value="WINDOWS" /&gt; &lt;parameter name="NAME" value="Simple Image Upload Test" /&gt; &lt;classes&gt; &lt;class name="audioTestsNodeFormPlus.xxxxxx"/&gt; &lt;/classes&gt; &lt;/test&gt; &lt;/suite&gt; </code></pre> <p>The base class looks like this -</p> <pre><code>@BeforeClass @Parameters({"BROWSER","VERSION","PLATFORM","NAME"}) public void setup(String BROWSER, int VERSION, String PLATFORM, String NAME) throws IOException { if (BROWSER.equals("FF")) { DesiredCapabilities capabillities = DesiredCapabilities.firefox(); capabillities.setCapability("version", VERSION); capabillities.setCapability("platform", Platform.valueOf(PLATFORM)); capabillities.setCapability("selenium-version", "2.32.0"); capabillities.setCapability("name", NAME); </code></pre>
    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