无法运行黄瓜功能特性 [英] Unable to run cucumber feature feature

查看:11
本文介绍了无法运行黄瓜功能特性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法运行功能文件.每当我尝试运行文件时
我得到了下面的堆栈跟踪

I am unable to run the feature file. whenever i tried to run the file
i am getting the below stack trace

    Exception in thread "main" Usage: java cucumber.api.cli.Main [options] [         
    [FILE|DIR][:LINE[:LINE]*] ]+
    Options:

-g, --glue PATH                    Where glue code (step definitions and hooks) is loaded from.
-f, --format FORMAT[:PATH_OR_URL]  How to format results. Goes to STDOUT unless PATH_OR_URL is specified.
                                   Built-in FORMAT types: junit, html, pretty, progress, json.
                                   FORMAT can also be a fully qualified class name.
-t, --tags TAG_EXPRESSION          Only run scenarios tagged with tags matching TAG_EXPRESSION.
-n, --name REGEXP                  Only run scenarios whose names match REGEXP.
-d, --[no-]-dry-run                Skip execution of glue code.
-m, --[no-]-monochrome             Don't colour terminal output.
-s, --[no-]-strict                 Treat undefined and pending steps as errors.
    --snippets                     Snippet name: underscore, camelcase
    --dotcucumber PATH_OR_URL      Where to write out runtime information. PATH_OR_URL can be a file system
                                   path or a URL.
-v, --version                      Print version.
-h, --help                         You're looking at it.

  cucumber.runtime.CucumberException: Unknown option: --plugin
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:119)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:50)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:44)
at cucumber.api.cli.Main.run(Main.java:20)
at cucumber.api.cli.Main.main(Main.java:16)

请帮我解决问题

推荐答案

我也遇到了这个问题,我做了以下解决它,感谢视频中 Anusha 的评论 https://youtu.be/pD4B839qfos- 主要技巧是首先更改您拥有的jar文件,如下所示黄瓜核心 1.2.5.jar黄瓜-java-1.2.5.jar黄瓜junit-1.2.5.jar或以上任何一项,从 1.2.4 开始- 还更新以下 selenium-server-standalone-2.42.0.jar 及更高版本- 还将格式关键字更改为插件

Hi I also had this issue as well, and I did the following to resolve it, thanks to the comments of Anusha from video https://youtu.be/pD4B839qfos -the main trick is to firstly change the jar files you have as follows cucumber-core-1.2.5.jar cucumber-java-1.2.5.jar cucumber-junit-1.2.5.jar or any of the above, from 1.2.4 upwards - also update the following selenium-server-standalone-2.42.0.jar and upwards - also change the format keyword to plugin

进行上述更改后,这应该可以解决您的问题.

Once you make the above changes, this should resolve your problem.

这篇关于无法运行黄瓜功能特性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆