Answers for "how do you implement data provider in your framework"

0

how do you implement data provider in your framework

HOW DO YOU IMPLEMENT DATA PROVIDER IN YOUR FRAMEWORK?

DataProvider returns a single or multi-dimensional
JAVA Object array to the test method and the
test method, will invoke M times in a M*N type
of object array. For example, if the DataProvider
returns an array of 3*2 objects, 
the corresponding test case will be invoked
3 times with 2 parameters each time.

	@Test(dataProvider="myData")
	public void testMethod(String author,String searchKey){
	{
	  //CODES HERE
	}

	@DataProvider(name="myData")
	public Object[][] getDataFromDataprovider(){
	    Object[][] obj={{ "Guru99", "India" }, { "Krishna", "UK" },{ "Bhupesh", "USA" }};
		return obj; 
	}
Posted by: Guest on January-15-2021

Code answers related to "how do you implement data provider in your framework"

Browse Popular Code Answers by Language