gpt4 book ai didi

java - cucumber .runtime.CucumberException : Couldn't load plugin class: json-pretty with Cucumber Selenium and Java

转载 作者:行者123 更新时间:2023-11-30 01:58:14 26 4
gpt4 key购买 nike

我是 java-cucumber 新手。收到此错误:

cucumber.runtime.CucumberException: Couldn't load plugin class: json-pretty

原因:java.lang.ClassNotFoundException:json-pretty

Here is my pom.xml

@RunWith(Cucumber.class)
@CucumberOptions(
plugin={"pretty", "html:target/cucumber-htmlreport", "json-pretty:target/cucmber-report.json"})

public class CucumberTest {
//codes
}

最佳答案

看来你已经很接近了。

您需要按如下方式更改插件定义:

import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions( plugin={"pretty:target/cucumber-htmlreport.text", "json:target/cucmber-report.json"})

public class CucumberTest { //codes }

关于java - cucumber .runtime.CucumberException : Couldn't load plugin class: json-pretty with Cucumber Selenium and Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53697027/

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