I am using standalone jar for executing karate scenarios (java -jar karate.jar xyz.feature). I am stuck at below two concerns
Concern1: Unable to call java class, it just throws TypeError unable to access or file not found
Scenario:
* def javaFile = Java.type('test')
* def obj = new javaFile()
* print obj.getName()
Test Class:
public class test {
public String getName(){
return "happyface";
}
}
Concern2: As i was unable to call java, used js for creating DB connection. Connection is successful but stuck at converting the returned object.
Scenario:
* def stmt = conn.createStatement()
* def dbResponse = stmt.executeQuery('SELECT * FROM xyztable');
* print dbResponse.label
* json jsonValues = dbResponse
* print jsonValues.label
* print JSON.stringify(dbResponse)
None of the above works, is there any simple way in converting the return object from dbResposne? Expecting data from dbResposne as List<Map<String, Object>> (Example of two rows of data from a database table)
Thanks for the help!!