Answers: <p>I got the answer on StackOverflow :</p>
  
  <p>You can pass the xml file name as parameter to the maven test command. First need to change the pom file as follows.</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.19.1&lt;/version&gt;
          &lt;configuration&gt;
              &lt;suiteXmlFiles&gt;
                  &lt;suiteXmlFile&gt;${SuiteXmlFile}&lt;/suiteXmlFile&gt;
              &lt;/suiteXmlFiles&gt;
          &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Then, you pass the different file name for each execution in goals and options like :</p>
  
  <pre><code>test -DSuiteXmlFile=mytestng1.xml
  </code></pre>
  
  <p>For second xml file :</p>
  
  <pre><code>test -DSuiteXmlFile=mytestng1.xml
  </code></pre>
  
  <p>You can configure each Jenkins job with different parameter.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-12-16T05:50:39.457Z
Answers: 2017-12-16T05:50:39.457Z
Answers: NarendraR
Body: <p>I've around 100 test method in my testing.xml file. and that testing.xml configured in pom.xml file so I'm able to run my all those testcase as maven test and I'm getting the proper reports and all.</p>
  
  <p>I have created one Jenkins job and configured maven project in that and mentioned pom.xml file path of local. I'm able to run successfully. </p>
  
  <p><a href="https://i.sstatic.net/X8WhF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/X8WhF.png" alt="enter image description here"></a></p>
  
  <p>I'm planning to separate some testcase category wise and manage then in another testing.xml file. lets say 2 xml file having 50 50 test methods.</p>
  
  <p>I'm stuck here. Is it possible to configure every testing.xml file in separate Jenkins job ? if yes then how do i configure ? (Note: I have to run maven test for getting the reports)</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-12-10T11:41:47.960Z
Comments: I have 2 modules lets say A & B, each contain 50 testcases in my testing.xml file and that testing.xml configured in pom.xml file using Maven I want to configure in Jenkins using Maven and execute each module using Parameterization. Ex: If I select A module/testsuit from "Build with parameters" drop down it should execute only A testsuit testcases only. I'm stuck in this kindly help
Comments: mahantesh sapgole
Tags: <jenkins><testing><maven><java><selenium>
Title: Is it possible to run every testing.xml file with different jenkins job?
UserDisplayName: NarendraR
ThreadText: # Is it possible to run every testing.xml file with different jenkins job?
  
  (Asked by: username_0 on 2017-12-15)
  
  I've around 100 test method in my testing.xml file. and that testing.xml configured in pom.xml file so I'm able to run my all those testcase as maven test and I'm getting the proper reports and all.
  
  I have created one Jenkins job and configured maven project in that and mentioned pom.xml file path of local. I'm able to run successfully.
  
  [![enter image description here](https://i.sstatic.net/X8WhF.png)](https://i.sstatic.net/X8WhF.png)
  
  I'm planning to separate some testcase category wise and manage then in another testing.xml file. lets say 2 xml file having 50 50 test methods.
  
  I'm stuck here. Is it possible to configure every testing.xml file in separate Jenkins job ? if yes then how do i configure ? (Note: I have to run maven test for getting the reports)
  
  **Tags:** jenkins, testing, maven, java, selenium
  
  > **Comments:**
  > **username_1**: I have 2 modules lets say A & B, each contain 50 testcases in my testing.xml file and that testing.xml configured in pom.xml file using Maven I want to configure in Jenkins using Maven and execute each module using Parameterization. Ex: If I select A module/testsuit from "Build with parameters" drop down it should execute only A testsuit testcases only. I'm stuck in this kindly help  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-12-16. Score: 2 | Accepted answer
  
  I got the answer on StackOverflow :
  
  You can pass the xml file name as parameter to the maven test command. First need to change the pom file as follows.
  
  ```
  <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.19.1</version>
          <configuration>
              <suiteXmlFiles>
                  <suiteXmlFile>${SuiteXmlFile}</suiteXmlFile>
              </suiteXmlFiles>
          </configuration>
  </plugin>
  
  ```
  
  Then, you pass the different file name for each execution in goals and options like :
  
  ```
  test -DSuiteXmlFile=mytestng1.xml
  
  ```
  
  For second xml file :
  
  ```
  test -DSuiteXmlFile=mytestng1.xml
  
  ```
  
  You can configure each Jenkins job with different parameter.
  
  
  ---
  
  