title: Using @Parameter annotation or ITestContext to read TestNG configuration file?
body: <p>I found out that there are 2 ways to read parameters in testng xml configuration file:</p>
  
  <ol>
  <li><p>use <code>@Parameter</code> annotation and define parameter names after the annotation</p></li>
  <li><p>use <code>ITestContext</code> as an argument for the test class, DataProvider or Factory and use <code>getCurrentXmlTest()</code> and <code>getParameter()</code> to read the parameter.</p></li>
  </ol>
  
  <p>Is any of these ways preferred for any reason on the other one? and is there any other way to do it?</p>