While I'm running karate feature files with java classes, the feature file step is failing with org.graalvm.polyglot.PolyglotException
and do we have a way to handle those exceptions?
Since there are couple of test cases which has java implementation and these are tested by karate features. i.e., let's assume a java class & feature
Class
public class TestUtil{
public static void execute(){
// this value might be null for some use cases & unexpected
Long unexepectedVal = SomeInternalClass.getValue();
SomeInternalImpl.processAndValidate(unexepectedVal.toString());
}
}
Feature
Background:
* def TestUtil = Java.type("pkg")
Scenario:
* eval TestUtil.execute()
While executing the feature file some use cases, I may get NPE/ConnectionTimeOutException/Other Runtime exceptions
and but during the failures I've got org.graalvm.polyglot.PolyglotException
as a root exception & how can we trace/print the the original exception in HTML report?.
Trying to catch the org.graalvm.polyglot.PolyglotException
and trace the original exception.