Karate 空手道';无法找到或读取文件';关于詹金斯大厦

Karate 空手道';无法找到或读取文件';关于詹金斯大厦,karate,Karate,我有一个功能文件,其中包含: Given path 'mypath' And def text = karate.readAsString('classpath:files/myfile.csv') 在本地PC上运行,但在Jenkins build服务器上运行时: com.intuit.karate.exception.KarateException: my.feature:16 - could not find or read file: classpath:files/myfile.csv

我有一个功能文件,其中包含:

Given path 'mypath'
And def text = karate.readAsString('classpath:files/myfile.csv')
在本地PC上运行,但在Jenkins build服务器上运行时:

com.intuit.karate.exception.KarateException: my.feature:16 - could not find or read file: classpath:files/myfile.csv at ?.And def text = karate.readAsString('classpath:files/myfile.csv') (my.feature:16)
该文件位于测试/资源中


用空手道0.9.5,我想我解决了。必须从pom构建中删除此项:

    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </testResource>
    </testResources>

src/test/java
**/*.爪哇
我的资源和java文件都在src/test/java下