小编Rak*_*kar的帖子

空手道:当我调用带有场景大纲的功能文件时,功能文件循环失败

我有 2 个功能文件并尝试执行以下操作

特征 1:[calling.feature]

Feature: Test loop over by calling a feature file

Scenario Outline: Testing loop over feature file
* call read('called.feature') { argument = '<arg>' }

Examples:
|arg| 
|"HELLO"|
|"WORLD"|
Run Code Online (Sandbox Code Playgroud)

特征 2:[被称为.特征]

Feature: Test loop over in Karate framework

Scenario Outline: Testing loop over feature
* def callingArg = arg
* match '<arg2>' == callingArg
Examples:
|arg2| 
|"TEST1"|
|"WORLD"|
Run Code Online (Sandbox Code Playgroud)

当我使用 'Calling.feature' 中的 read 调用 'Called.feature' 时,我期望它会在两个功能文件中的所有示例中迭代使用

但是空手道在发现失败时退出,在这种情况下,当从 Calling.feature 传递参数“HELLO”时,它在“被调用的.特征”中的匹配步骤期间失败,例如“TEST1”,并且从不测试“WORLD”。

有没有办法可以强制空手道完成被调用的功能中的所有场景示例???

以下是日志:

calling: [com.intuit.karate.exception.KarateException: path: $, actual: 'HELLO', …
Run Code Online (Sandbox Code Playgroud)

karate

2
推荐指数
1
解决办法
1447
查看次数

标签 统计

karate ×1