Thankyou Krishnan for the response. I am sharing the sample code below:
I have updated to TestNG 7.4.0
my excel file datacheck.xlsx have 8 fields of data for particular test case. I have given the dataprovider method that retrieves the data and put in data object.
Am utilizing the data Object in @Test method and passing the arguments. It works fine when passed all the arguments. Below code works fine for me.
I need help to avoid writing the all the arguments. Instead using some Object[][] in @Test method.
// Below code is to retrieve the data from excel to Object[][].
@DataProvider
public Object[][] dataone() {
data = Datareader.readExcel("D:\\Users\\Eclipse_Projects\\Selenium\\Testdata\\datacheck.xlsx", "sheet1", "tc1");
return data;
}
@Test(dataProvider="dataone")
// public void dataone(String Username, String Password, String DocumentType, String Signatory, String Purpose, String Remarks, String Filename, String extra) {
System.out.println("values are : Username : "+ Username+", Password : " + Password+", DocumentType : " + DocumentType+", Signatory :" + Signatory+", Purpose : " + Purpose + " , Remarks : " + Remarks + " , Filename : "+ Filename + "extra : "+extra);