#cucumber #cucumber-java #serenity-bdd #cucumber-junit #cucumber-serenity
Вопрос:
я обновлял свои зависимости от serenity и обнаружил эту ошибку java.lang.NoClassDefFoundError: cucumber/runtime/io/ResourceLoader У меня есть следующий файл build.gradle и конфигурация бегуна
ext{
serenity_core_version = "2.5.8"
serenity_cucumber_version = "6.11.0"
serenity_cucumber4_version = "2.1.2"
}
dependencies {
// compile localGroovy()
compile "net.serenity-bdd:serenity-core:$serenity_core_version"
compile "net.serenity-bdd:serenity-junit:$serenity_core_version"
compile "io.cucumber:cucumber-java:$serenity_cucumber_version"
compile "io.cucumber:cucumber-junit:$serenity_cucumber_version"
compile "net.serenity-bdd:serenity-screenplay:$serenity_core_version"
compile "net.serenity-bdd:serenity-screenplay-webdriver:$serenity_core_version"
compile "net.serenity-bdd:serenity-emailer:2.1.0"
compile "net.serenity-bdd:serenity-screenplay-rest:$serenity_core_version"
compile "net.serenity-bdd:serenity-cucumber4:$serenity_cucumber4_version"
compile "net.serenity-bdd:serenity-junit:$serenity_core_version"
/*Persistence*/
compile "org.hibernate:hibernate-core:5.4.10.Final"
compile "javax.persistence:javax.persistence-api:2.2"
implementation "mysql:mysql-connector-java:8.0.19"
compile "com.zaxxer:HikariCP:3.4.2"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
implementation 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.0'
implementation 'com.github.javafaker:javafaker:1.0.1'
implementation 'redis.clients:jedis:3.1.0'
implementation 'biz.paluch.redis:lettuce:3.2.Final'
/* Lombok */
compileOnly 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
testCompile 'org.slf4j:slf4j-simple:1.7.7'
testCompile 'junit:junit:4.13.2'
testCompile 'org.assertj:assertj-core:1.7.0'
/* testrail */
compile "com.codepine.api:testrail-api-java-client:2.0.1"
}
это конфигурация мой бегун
Бегун
import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
features = "src/test/resources/features/batchmanager",
glue = "co.com.servicios.automation.rest",
tags = "@mytest")
public class Mytest {}