Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
491 views
in Technique[技术] by (71.8m points)

dsl - Does the callonce function executes the feature again if i use use in this function multiple times in different features?

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 ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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');

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...