Katare DSL - 无法读取功能文件中的 .prn 文件,它会抛出错误 "gnoring dynamic expression, did not evaluate to list"

Katare DSL - can't read a .prn file in the feature file, it throws the error "gnoring dynamic expression, did not evaluate to list"

我在读取 .prn 文件时遇到问题(cvs 另存为 .prn)。 它抛出错误

12:47:00.930 [main] WARN com.intuit.karate - ignoring dynamic expression, did not evaluate to list: read('Requests/file.prn') - [type: INPUT_STREAM, value: java.io.FileInputStream@30c31dd7]

但是,如果我将扩展名更改为 .cvs,效果会很好。 有没有一种方法可以使用 karate-dsl 读取此 .prn 文件以评估为列表?

Feature: scenario outline using a table from a prn file
  ....
  Background: 
  *print ('Hello :)')
  ....
  Scenario Outline: ....
  ...
  Examples:
  | read('Requests/file.prn') |

根据文档 dynamic scenario outline,空手道仅支持 JSON 数组和 CSV 格式。

你必须自己编写Java/Javascript函数将你的PRN文件转换成JSON数组,然后它可以通过示例传递。