title: TestNG - How to pass variable's value as dataProvider name?
body: <p>I have a string variable <code>whichSet</code> that can hold either 3 values "prd", "stg" and "int". In the Test I want to pass the value as dataProvider like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Test(enabled = true, dataProvider = whichSet, dataProviderClass = TestDataProvider.class)
  </code></pre>
  
  <p>But i have the below error:</p>
  
  <pre><code>The value for annotation attribute Test.dataProvider must be a constant expression
  </code></pre>
  
  <p>I've already had 3 providers defined as:</p>
  
  <pre><code>@DataProvider(name="stg")
  @DataProvider(name="prd")
  @DataProvider(name="int")
  </code></pre>
  
  <p>Since i'm reading the data provider from another class (not in the test class), so i'm not able to pass the value to that class based on some test condition. Anyway that I can make the <code>dataProvider = whichSet</code> work? Thank you</p>