【问题标题】:Does the callonce function executes the feature again if i use use in this function multiple times in different features?如果我在不同的功能中多次使用此功能,那么 callonce 功能是否会再次执行该功能?
【发布时间】:2019-01-16 23:41:00
【问题描述】:

我的项目中有多个功能文件。功能文件之一创建令牌。我只想在测试开始时调用此功能一次,然后在另一个功能中使用令牌,而不是一次又一次地执行令牌功能。

有人可以帮我解决这个问题吗?

【问题讨论】:

    标签: dsl karate


    【解决方案1】:

    查看karate-config.js 中的callSingle(),请参考文档:https://github.com/intuit/karate#hooks

    var result = karate.callSingle('classpath:tokens.feature');
    

    【讨论】:

      猜你喜欢
      • 2021-06-14
      • 2018-06-15
      • 2021-08-24
      • 1970-01-01
      • 2021-03-18
      • 1970-01-01
      • 2012-03-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多