poohbar
11/06/2017, 12:21 PMNov 06, 2017 7:19:28 AM org.junit.platform.launcher.core.DefaultLauncher handleThrowable
WARNING: TestEngine with ID 'spek' failed to discover tests
java.lang.IllegalAccessError: tried to access method org.junit.platform.engine.support.descriptor.ClassSource.<init>(Ljava/lang/Class;)V from class org.jetbrains.spek.engine.SpekTestEngine
at org.jetbrains.spek.engine.SpekTestEngine.resolveSpec(SpekTestEngine.kt:114)
at org.jetbrains.spek.engine.SpekTestEngine.resolveSpecs(SpekTestEngine.kt:80)
at org.jetbrains.spek.engine.SpekTestEngine.discover(SpekTestEngine.kt:50)
at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:130)
at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:117)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
at org.jetbrains.spek.tooling.runner.junit.JUnitPlatformSpekRunner.run(JUnitPlatformSpekRunner.kt:107)
at org.jetbrains.spek.tooling.MainKt.main(Main.kt:58
pom.xml
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.github.jkcclemens</groupId>
<artifactId>khttp</artifactId>
<version>master-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.knowm.xchart</groupId>
<artifactId>xchart</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains.spek</groupId>
<artifactId>spek-api</artifactId>
<version>1.1.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jetbrains.spek</groupId>
<artifactId>spek-junit-platform-engine</artifactId>
<version>1.1.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.amshove.kluent</groupId>
<artifactId>kluent</artifactId>
<version>1.30</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
My test is in src/test/kotlin
object Test: Spek({
describe("a calculator") {
it("should return the result of adding the first number to the second number") {
"test" shouldEqual "test"
}
it("should return the result of subtracting the second number from the first number") {
}
}
})
raniejade
11/06/2017, 12:22 PM1.0.1
?poohbar
11/06/2017, 1:04 PMspek-api
...raniejade
11/06/2017, 1:06 PMpoohbar
11/06/2017, 1:26 PMspek-api
is definitely not enough which is all the guide mentions.poohbar
11/06/2017, 1:27 PMraniejade
11/06/2017, 1:27 PMpoohbar
11/06/2017, 1:28 PMpoohbar
11/06/2017, 1:33 PM<dependency>
<groupId>org.jetbrains.spek</groupId>
<artifactId>spek-api</artifactId>
<version>1.1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.spek</groupId>
<artifactId>spek-junit-platform-engine</artifactId>
<version>1.1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
notice there is no <type>pom</type>
poohbar
11/06/2017, 1:34 PM@RunWith
anotation so that part is also wrong in the docs.raniejade
11/06/2017, 1:35 PMpoohbar
11/06/2017, 1:37 PMspek
artifact that pulls all the other 3 dependencies as children..raniejade
11/06/2017, 1:38 PMraniejade
11/06/2017, 1:38 PM