org.graalvm.polyglot.PolyglotException: SyntaxError: Unnamed:1:76 Expected an operand but found eof methodName(param1,

22 Views Asked by At

I am trying to do a POC for converting my existing Cucumber project to Karate. I was told that Karate doesn't support custom step defenitions & we need to call the Java methods directly.

So below is my feature file & java class signature:

Scenario: get all users and then get the first user by id
    Given def param1 = ""
    And def param2 = ''
    And def param3 = ''
    And def param4 = ''
    And def param5 = ''

    * call com.automation.tesco.stepdefs.KafkaSteps.createKafkaStockChangeEvent(param1, param2, param3, param4, param5)

Java method signature:

public static void createKafkaStockChangeEvent(String source, String source_TransactionType, String source_transferLocationType, String source_transferLocationId, String stock_TransactionType) {
}

Note: If the method requires only one input parameter, the feature file is executing properly. Issues occurs only when passing multiple input parameters

0

There are 0 best solutions below