Search code examples
karate

Can we call a scenario from one feature in another using karate?


We have a feature A with several scenarios. And we need one scenario from that file. Can we call it in our feature B?


Solution

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