I need to call a .py file and pass an argument to one of the functions in it and have to match the result returned.
For instance: xyz.py
KarateXyz.feature
- match result == call('xyz.py')# how to specify the method name and pass an argument in it?
I need to call a .py file and pass an argument to one of the functions in it and have to match the result returned.
For instance: xyz.py
KarateXyz.feature
Yes, you can use karate.exec()
to call any OS process. Whether python is installed is up to you. Refer https://github.com/intuit/karate#karate-exec
* def result = karate.exec('python foo.py bar')
For more details, refer: https://stackoverflow.com/a/64352676/143475