Karate 调用功能文件时获取java.lang.nullpointer异常

Karate 调用功能文件时获取java.lang.nullpointer异常,karate,Karate,我只是简单地尝试在另一个功能文件中调用该功能文件,但仍然得到java.lang.nullpointer异常 我在空手道官方博客上提供了各种技巧和方法,但错误仍然是一样的 Feature: Quote generator Background: * url 'https://reqres.in' @SmokeTest Scenario: Fetch random quote Given path '/api/users/'+pageNo.Pageno When method GET The

我只是简单地尝试在另一个功能文件中调用该功能文件,但仍然得到java.lang.nullpointer异常

我在空手道官方博客上提供了各种技巧和方法,但错误仍然是一样的

Feature: Quote generator

Background:
* url 'https://reqres.in'


@SmokeTest
Scenario: Fetch random quote

Given path '/api/users/'+pageNo.Pageno
When method GET
Then status 200
* def Response = response.data
Then print 'Value of response is: ' +Response
Then def msg = call read('file:src/test/java/com/features/Generic.feature') {name:'lakshmi', job:'Software'}
正在获取的实际错误:

然后def msg=call read'file:src/test/java/com/features/Generic.feature'{name:'lakshmi',job:'Software'}StepDefs.defString,String java.lang.NullPointerException 位于com.intuit.karate.cucumber.KarateHtmlReporter.karatesteprocedkaratehtmlreporter.java:180 位于com.intuit.karate.cucumber.karaterporterbase.karatestepkaraterporterbase.java:79 在com.intuit.karate.cucumber.KarateReporterBase.callBeginKarateReporterBase.java:69 位于com.intuit.karate.Script.evalFeatureCallScript.java:1657 位于com.intuit.karate.Script.evalFeatureCallScript.java:1641 在com.intuit.karate.Script.callScript.java:1578使用

* def calledFeature = call read('classpath:com/features/Generic.feature')  {name:'lakshmi', job:'Software'}
请看这里:

Prefix     | Description
classpath: | relative to the classpath, recommended for re-usable features
file:      | do not use this unless you know what you are doing, see above
this:      | when in a called feature, ensure that files are resolved relative to the current feature file
可在以下文档中找到:

Prefix     | Description
classpath: | relative to the classpath, recommended for re-usable features
file:      | do not use this unless you know what you are doing, see above
this:      | when in a called feature, ensure that files are resolved relative to the current feature file