'Karate: can we get the response returned when scenario is called with parameter

I am trying to reuse a scenario in a feature file with call feature in the main feature file

the steps are as follows

  1. main feature file calling the reusable features file with parameter input to the called scenario

ex:

  • def outputdata = call read('file:features/commonFeatures/commonFunctions.feature@customer') ({ 'customerId' : partyId })

Note: tried with karate.call as well, perhaps it does not provide the required outcome

and the customer id is passed as input to the called scenario of the feature file.

  1. when i used the outputdata variable to get the output of the call scenario, not getting the response of API returned. getting polygot exception

could you please suggest me a way to get the response returned from a called scenario with parameterization



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source