2 Replies Latest reply: Apr 3, 2012 10:46 AM by 928187 RSS

    Using the @DataProvider values in another annotation

    928187
      Hi,

      It's a simple TESTNG code,
      @DataProvider(name="value")
           public Object[][] companyValues(){
                Object[][] a = {
                          {"US","Plus"},
                          {"UK","SS"}}};

      @Test(dataProvider="value")
      @RequiresQBOCompany(
                     params={"region","SKU"},
                     values={region,sku})
      void provideDataProvider(String region, String sku){
      }


      This @RequiresQBOCompany is a annotation which creates a company based on the parameters given. What I want to know is is there any way by which I can set the values of the annotation with the values that my data provider gives me???

      I have a large set of dataproviders and need to create many companies for testing the same thing. Is there a better way to do this?

      Will be very grateful if anyone provides insight for this.

      Thanks in advance!!

      Regards,
      Sonam