问题
I have multiple feature files in my project. One of the feature file creates tokens. I want to call this feature only once at the start of the test and then use the tokens in the other feature without executing the token feature again and again.
Can someone please help me with this ?
回答1:
Look at callSingle()
in karate-config.js
and please refer the docs: https://github.com/intuit/karate#hooks
var result = karate.callSingle('classpath:tokens.feature');
来源:https://stackoverflow.com/questions/54227040/does-the-callonce-function-executes-the-feature-again-if-i-use-use-in-this-funct