【问题标题】:Need to generate cucumber report using cucumber cli需要使用黄瓜cli生成黄瓜报告
【发布时间】:2021-04-17 02:40:42
【问题描述】:

我遇到了一种情况,我需要运行 TestRunner 类 使用黄瓜 Cli,但 TestRunner 无法生成任何报告 你能,请提出任何想法/方法来实现这一目标?

cucumberCli 示例

  • 罐子
  • 测试
    • 步骤定义
      • *.java
    • 功能
      • *.feature
    • TestRunner.java

【问题讨论】:

    标签: selenium automated-tests cucumber qa


    【解决方案1】:

    在程序参数的末尾添加以下参数 ——插件html:target/Destination/

    如果您正在寻找Json报告,您也可以在这里添加json插件。

    【讨论】:

      【解决方案2】:

      在你的跑步者课上试试这个。

      @CucumberOptions(`features = {"src/test/java/com/mnt/bdd/features/"}`,
              `glue` = `{"com/mnt/bdd/stepdef"}`,
              `tags` = `{"@Login","@Logout"}`,
              //monochrome = false, // display the console output in readable format
              //strict = false,      // no declaration of any step , strict = false --> pass , true--> fail
              //dryRun = false,     // checking if mapping is in place
              plugin = `{"json:target/cucumber-reports/CucumberTestReport.json"}`
      

      只需根据您的项目编辑标签。

      【讨论】:

      • java -cp ".;./jars/*" cucumber.api.cli.Main -g test test,我正在使用这个命令运行但是TestRunner类本身没有运行。跨度>
      猜你喜欢
      • 2022-01-27
      • 2018-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-18
      相关资源
      最近更新 更多