1

I need to pass response value from feature file to javascript function which is defined at config.js file for some computation purposes . Please help on how to call function which is present at config.js file?

1 Answer 1

2

First refer to this: https://github.com/intuit/karate#javascript-functions

Just keep the JS as a *.js file and re-use it from any feature or the karate-config.js. Note that karate.call() is possible from JS, including karate-config.js and you can even call a feature file, not just JS.

Maybe you should also look at the example for karate.callSingle() which is new in 0.7.0. As of the time of this post, version 0.7.0.RC5 is available to test.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.