Serenity Cucumber Spring Version兼容性

时间:2018-01-17 05:39:56

标签: serenity-bdd cucumber-serenity

我正在尝试将Serenity与Cucumber和Spring一起使用,但由于此异常,我无法启动应用程序:

org.openqa.selenium.interactions.internal.Locatable

以下是我的build.gradle的样子:

buildscript {
    ext {
        springBootVersion = '1.5.8.RELEASE'
    }
    repositories {
        // Nexus Repository
    }
    dependencies {
        ...
        classpath("net.serenity-bdd:serenity-gradle-plugin:1.8.21")
    }
}

...
apply plugin: 'org.springframework.boot'
apply plugin: 'net.serenity-bdd.aggregator'

sourceCompatibility = 1.8

repositories {
    // Nexus Repository
}

dependencies {
    ...
    testCompile group: 'net.serenity-bdd', name: 'serenity-spring', version: '1.8.21'
    testCompile group: 'net.serenity-bdd', name: 'serenity-cucumber', version: '1.6.10'

    testCompile group: 'junit', name: 'junit', version: '4.12'
    testCompile('org.springframework.boot:spring-boot-starter-test')

}

gradle.startParameter.continueOnFailure = true

我只能访问私有Nexus存储库以获取依赖关系,serenity-spring的最新版本为1.8.21,而serenity-cucumber的最新版本为1.6.10

以下是Runner类的内容:

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
        features = "src/test/resources/features",
        format = {"pretty","html:report"},
        glue = "<ommited>"
)
public class CucumberTestRunner {
}

我只能找到这个似乎过时的文档:http://thucydides.info/docs/serenity-staging/#_building_serenity_projects_in_gradle

1 个答案:

答案 0 :(得分:0)

这看起来像是与Selenium不兼容的版本。但使用宁静黄瓜1.6.10也会更明智。