我的測試套件工作正常,直到它使用版本 0.9.2。我有一個帶有 KarateOptions 的測試運行程序來指定要執(zhí)行的功能文件@KarateOptions(tags = {"~@ignore"}, features = { "src/test/java/com/pro/api/tests/features/beforesuitescenarios/feature1.feature", "src/test/java/com/pro/api/tests/features/customerscenarios/feature2.feature", "src/test/java/com/pro/api/tests/features/servicerequestscenarios/feature3.feature", "src/test/java/com/pro/api/tests/features/invoicescenarios/feature4.feature", })測試運行程序使用的是黃瓜運行程序, @Testpublic void testAllFeatures() throws Exception { String karateOutputPath = "target/surefire-reports"; KarateStats stats = CucumberRunner.parallel(getClass(), 1, karateOutputPath); generateReport(karateOutputPath); assertTrue("There are scenario failures", stats.getFailCount() == 0);}我嘗試將框架升級到 0.9.5 并修改了運行程序,就像最新文檔中提到的那樣,@Testpublic void testAllFeatures() throws Exception { String karateOutputPath = "target/surefire-reports"; Results stats = Runner.parallel(getClass(), 1, karateOutputPath); generateReport(karateOutputPath); assertTrue("There are scenario failures", stats.getFailCount() == 0);}現(xiàn)在,當(dāng)我執(zhí)行這個套件時,測試正在正確執(zhí)行。但是在所有功能文件的測試執(zhí)行完成后,它會拋出該行的錯誤結(jié)果統(tǒng)計 = Runner.parallel(getClass(), 1, karateOutputPath);對于以下 IllegalArgumentException,[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1,295.291 s <<< FAILURE! - in com.pro.api.tests.features.TestRunner[ERROR] testAllFeatures(com.pro.api.tests.features.TestRunner) Time elapsed: 1,295.22 s <<< ERROR!java.lang.IllegalArgumentException: Illegal group referenceat com.pro.api.tests.features.TestRunner.testAllFeatures(TestRunner.java:55)我在給跑步者打電話時錯過了什么?如何解決這個問題?
1 回答

四季花海
TA貢獻1811條經(jīng)驗 獲得超5個贊
感謝您的提示 - 這確實是時間線報告代碼中的錯誤。
問題參考: https: //github.com/intuit/karate/issues/1085
所以你需要等待下一個版本,或者應(yīng)該很快就會有 RC 版本,以便你可以嘗試一下。
- 1 回答
- 0 關(guān)注
- 125 瀏覽
添加回答
舉報
0/150
提交
取消