January 2018
Beginner to intermediate
354 pages
7h 59m
English
The following code is for the JSONDataProvider.java class:
import org.json.simple.JSONArray;import org.json.simple.JSONObject;import org.json.simple.parser.JSONParser;import org.testng.annotations.DataProvider;import java.io.FileReader;import java.lang.reflect.Method;import java.util.ArrayList;import java.util.Arrays;import java.util.List;/** * @author Carl Cocchiaro * * TestNG JSON DataProvider Utility Class * */public class JSONDataProvider { public static String dataFile = ""; public static String testCaseName = "NA"; public JSONDataProvider() throws Exception { } /** * fetchData method to retrieve test data for specified method * * @param method * @return Object[][] * @throws Exception */ @DataProvider(name =
Read now
Unlock full access