1

I'm trying to use Serenity with Cucumber and Spring, but I can't start the application due to this exception:

org.openqa.selenium.interactions.internal.Locatable

Here's how my build.gradle looks like:

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

I can only access a private Nexus Repository for dependencies, and the latest versions for serenity-spring is 1.8.21 and for serenity-cucumber is 1.6.10.

Here is what the Runner class looks like:

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

I've only been able to find this documentation which seems to be out dated: http://thucydides.info/docs/serenity-staging/#_building_serenity_projects_in_gradle

Bill
  • 53
  • 7

1 Answers1

0

This looks like a version incompatibility with Selenium. But it would be also wiser to use serenity-cucumber 1.6.10.

John Smart
  • 969
  • 1
  • 5
  • 5
  • I can't use `1.6.10` because it's not in my Nexus Repository. What version should I downgrade to? – Bill Jan 17 '18 at 15:16
  • Okay, nevermind. `1.6.10` is on the list (it was further down). But I'm still geting the `NoClassDefFoundError`. – Bill Jan 17 '18 at 15:50