Reputation: 93
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
Upvotes: 1
Views: 1616
Reputation: 58058
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
Upvotes: 1