Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling feature file with multiple arguments

Tags:

karate

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??

like image 961
swapna Avatar asked Apr 07 '26 18:04

swapna


1 Answers

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.

like image 164
Babu Sekaran Avatar answered Apr 16 '26 17:04

Babu Sekaran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!