title: How to pass an integer array testng.xml
body: <p>I need to pass an integer array in my testng.xml file because I'm using it as my config file to run multiple tests on a method I wrote, to make it data driven. </p>
  
  <p>this method: </p>
  
  <pre><code>@Test(groups="runnable")
  @Parameters({"fName","lName","childAges"})
  public void test(String firstName, String lastName, Integer[] childAges);
  </code></pre>
  
  <p>And in my testng.xml file:</p>
  
  <pre><code>&lt;test name="WyomingComplex4Kids (Positive)"&gt; 
      &lt;parameter name="fName" value="John"/&gt; 
      &lt;parameter name="lName" value="Johnson"/&gt;  
      &lt;parameter name="childAges" value="{10,7,3,6}"/&gt; 
      &lt;parameter name="server" value="https://example.server.com/app/someRoute"/&gt;
      &lt;parameter name="port" value="443"/&gt;
      &lt;groups&gt;  
          &lt;run&gt; 
              &lt;include name="runnable"/&gt;  
          &lt;/run&gt; 
      &lt;/groups&gt; 
      &lt;classes&gt; 
              &lt;class name = "com.somecompany.test.EligibilityComplex1"/&gt; 
      &lt;/classes&gt; 
  &lt;/test&gt; 
  </code></pre>
  
  <p>takes in an integer array which contains child ages, this doesn't seem to work. I am new to testng and testing in general. Can somebody help me here? I heard of using a dataprovider tp pass complex objects (i.e. like an array or list) but I am unable to understand how it works or how I can use it in my test. So any help will be much appreciated, thanks.</p>