gpt4 book ai didi

java - 如何更新 Cucumber-JVM 的 --format 选项?

转载 作者:行者123 更新时间:2023-12-01 11:17:43 25 4
gpt4 key购买 nike

我的 Cucumber 功能如下所示:功能:登录操作

Scenario: Successful Login with Valid Credentials
Given User is on Home Page
When User Navigate to LogIn Page
And User enters UserName and Password
Then Message displayed Login Successfully

Scenario: Successful LogOut
When User LogOut from the Application
Then Message displayed LogOut Successfully

当我运行它时,出现以下错误:

WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead. Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\Users\testjack001\workspace\myProject\src\myFeature.feature at cucumber.runtime.io.FileResourceIterator$FileIterator.(FileResourceIterator.java:54) at cucumber.runtime.io.FileResourceIterator.(FileResourceIterator.java:20) at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19) at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:101) at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54) at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34) at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:201) at cucumber.runtime.Runtime.run(Runtime.java:109) at cucumber.api.cli.Main.run(Main.java:36) at cucumber.api.cli.Main.main(Main.java:18)

如何解决这个问题?

最佳答案

有关 --format 选项的条目只是一个警告,而不是一个错误。您的错误从下一行开始:

Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\Users\testjack001\workspace\myProject\src\myFeature.feature

Cucumber 无法在其预期放置的位置找到您的功能文件。

关于java - 如何更新 Cucumber-JVM 的 --format 选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31605005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com