cucumber.runtime.CucumberException: не удалось загрузить класс плагина: json-pretty с Cucumber Selenium и Java - PullRequest
0 голосов
/ 10 декабря 2018

Я новичок в ява-огурце.Получение этой ошибки:

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
}

1 Ответ

0 голосов
/ 10 декабря 2018

Кажется, вы были довольно близки.

Вам нужно изменить определения плагина следующим образом:

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 }
...