I have a testNg class where I have to run the same test over a complete set of data. I could provide each data line in the @dataprovider, however, the result for each data line would be displayed in the report file. In my case, I have to test millions of data. This would cause a very cluttered report. Below is an example.
TestData: My Test data is a file containing multiple JSON lines where each JSON object should have a name and occupation.
{"name":"Jim", "occupation":"racing"}
{"name":,}
My Test NG class will look like:
public class TestJSon {
@DataProvider("lineProvider")
public Object[][] lineProvider() {
// return JSON lines
}
@Test (dataProvider = "lineProvider")
public void testJsonLines(String name, String occupation) {
// Test name and occupation
}
}
Now the output report will contain:
testJsonLines passed for line with name Jim testJsonLines failed for line {"name":,} testJsonLines failed for line {} testJsonLines failed for line {"name":"Jack","occupation":"}
I would like a report where it is simply printed:
testJSON inputs failed for inputs in lines 2,3 and 4
To summarize, I am trying to make my report group the results of a run over all data ra rather than print each. Is there a way to do this ?