Home > database >  Karate feature file calling Java class with spring annotations, getting PolyglotException
Karate feature file calling Java class with spring annotations, getting PolyglotException

Time:12-22

I have some classes having Java code with spring annotation, however its observed when we call them from .feature file, getting org.graalvm.polyglot.PolyglotException. When removed those annotation it worked. Now we have my libraries which use such classes, so can anybody help on same how to invoke spring flavoured classes from feature files.

CodePudding user response:

Please note that re-using "production" objects in your test-suites is a common mistake, please don't do it. Because the risk is that when you re-factor some Java classes, you will never know if it really breaks some API consumers.

You can assume that what you are trying to do is not supported by Karate. If you follow this process, others will be in a better position to suggest a workaround: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

  • Related