功能文件指向一个不存在的项目
Feature file is pointing to a non-existing project
我正在为我的应用程序编写一个 Cucumber-TestNG-Selenium 框架。我能够从我的 运行ner class 执行测试用例,但是当我尝试通过功能文件执行相同的操作时,我得到一个错误,指出它指向某个不存在的项目。
以上是功能文件的 运行 As Configuration 属性的快照,class 路径中存在错误。
当我删除此文件并创建一个新文件时,出现以下错误:
Exception in thread "main" java.lang.IllegalArgumentException: Expected scheme-specific part at index 10: classpath:
at java.net.URI.create(URI.java:852)
at io.cucumber.core.model.GluePath.parseAssumeClasspathScheme(GluePath.java:54)
at io.cucumber.core.model.GluePath.parse(GluePath.java:34)
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:160)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:107)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:100)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:96)
at cucumber.runtime.Runtime$Builder.withArgs(Runtime.java:131)
at cucumber.runtime.Runtime$Builder.withArgs(Runtime.java:127)
at cucumber.api.cli.Main.run(Main.java:22)
at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.net.URISyntaxException: Expected scheme-specific part at index 10: classpath:
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.failExpecting(URI.java:2854)
at java.net.URI$Parser.parse(URI.java:3057)
at java.net.URI.<init>(URI.java:588)
at java.net.URI.create(URI.java:850)
... 10 more
我能够通过 testng.xml 和 Cucumber 运行ner 文件执行测试用例。
请告诉我如何解决此错误
转到 Cucumber Feature Runner 选项卡,然后检查以下三个字段是否已相应设置。
- 项目,
- 特征路径,
- 胶水
如果所有设置都正确,应该可以正常执行。
我也遇到了同样的错误。如果您使用的是 Cucumber v4.2.3。使用 v4.2.2 并尝试。对我来说它有效。
我正在为我的应用程序编写一个 Cucumber-TestNG-Selenium 框架。我能够从我的 运行ner class 执行测试用例,但是当我尝试通过功能文件执行相同的操作时,我得到一个错误,指出它指向某个不存在的项目。
以上是功能文件的 运行 As Configuration 属性的快照,class 路径中存在错误。
当我删除此文件并创建一个新文件时,出现以下错误:
Exception in thread "main" java.lang.IllegalArgumentException: Expected scheme-specific part at index 10: classpath:
at java.net.URI.create(URI.java:852)
at io.cucumber.core.model.GluePath.parseAssumeClasspathScheme(GluePath.java:54)
at io.cucumber.core.model.GluePath.parse(GluePath.java:34)
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:160)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:107)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:100)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:96)
at cucumber.runtime.Runtime$Builder.withArgs(Runtime.java:131)
at cucumber.runtime.Runtime$Builder.withArgs(Runtime.java:127)
at cucumber.api.cli.Main.run(Main.java:22)
at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.net.URISyntaxException: Expected scheme-specific part at index 10: classpath:
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.failExpecting(URI.java:2854)
at java.net.URI$Parser.parse(URI.java:3057)
at java.net.URI.<init>(URI.java:588)
at java.net.URI.create(URI.java:850)
... 10 more
我能够通过 testng.xml 和 Cucumber 运行ner 文件执行测试用例。
请告诉我如何解决此错误
转到 Cucumber Feature Runner 选项卡,然后检查以下三个字段是否已相应设置。
- 项目,
- 特征路径,
- 胶水
如果所有设置都正确,应该可以正常执行。
我也遇到了同样的错误。如果您使用的是 Cucumber v4.2.3。使用 v4.2.2 并尝试。对我来说它有效。