在项目构建期间获得 "File not found exception" 而 运行 柑橘测试

Getting "File not found exception" while running citrus tests during project build

我有一个类似的方法可以执行位于项目包中的 xml 个文件

 @Test
    @CitrusXMlTest(packageScan="com.something.xxxx")
    public void citrusTest()
    {
    }

虽然 运行 通常使用 testng 它执行得很好,但是在测试阶段使用 maven 构建时测试失败,因为文件未找到异常。但是在提到路径相关 windows 文件系统时,测试执行得很好

 @CitrusXMlTest(packageScan="file:D:\xxx\xyz")

如何让 citrus 执行 xml 路径中的 class 测试用例。非常感谢您的帮助。

您必须在 sec/test/resources 而非 src/test/java

下创建包扫描中提到的包名称