问题
We are using karate, wich is very funny. Sorry, but i didn't find any information about my issue. We have a feature A with several scenarii. And we need one scenario from that file. Can we call it in our feature B?
回答1:
No. You need to extract that Scenario into a separate*.feature
file and then re-use it using the call keyword.
EDIT: Karate 0.9.0 onwards will support being able to call by tag as follows:
* def result = call read('some.feature@tagname')
回答2:
I have a concern with this approach: Karate should allow re-usability from a feature file itself for a particular scenario.
If I have such numerous cases then i will end up with a lot of feature files which would be holding duplicate scenarios just for the sake of getting called.
来源:https://stackoverflow.com/questions/46372155/can-we-call-a-scenario-from-one-feature-in-another-using-karate