How to print whole database data in the console

Hello,

  • I have stored my database data into data files.
  • After that, I created a variable in the test case and the Variable type is “Test Data”.
  • When I print that test data into console am getting this type of data “com.kms.katalon.core.testdata.DBData@732f29af” So anyone please tell me how to print whole data in the console which are present in my data files.

Hi @yogesh.mantri

Please refer to:

https://docs.katalon.com/javadoc/com/kms/katalon/core/testdata/TestData.html

There’s a method getAllData() which returns a List<List<Object>> that you can iterate over and print out the values as necessary. Consider the following (untested) piece of code:

testData.getAllData().stream().forEach(entry -> {
   // Each entry is also a List
  entry.stream().forEach(thing -> {
    println thing; 
  });
});

Thanks it is helpful for me.