I want to call a feature file with 3 arguments, 1 st argument to create entity with that name and rest of 2 arguments to verify created entity has desired values for particular fields. How can I do this in Karate??
You can keep all the input in one JSON and pass it to your feature as mentioned in this documentation.
Calling other features
Feature: main
Scenario:
* def result = call read('myfeature.feature') { createEntity: 'value', arg1: 'arg1Value',arg2: 'arg2Value'}
Inside your called feature you can directly access the values by the key that you used in your JSON.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With