brainail
08/09/2017, 9:00 PMtestImplementation "junit:junit:$junit_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation "org.jetbrains.spek:spek-api:$spek_version"
testImplementation "org.jetbrains.spek:spek-junit-platform-engine:$spek_version"
testImplementation "org.junit.platform:junit-platform-launcher:$junit_platform_version"
junitPlatform {
filters {
engines {
include 'spek'
}
}
}
where
ext.kotlin_version = '1.1.3-2'
ext.junit_version = '4.12'
ext.junit_platform_version = '1.0.0-M4'
ext.spek_version = '1.1.2'
orangy
brainail
08/10/2017, 10:10 AMjw
08/11/2017, 12:20 AMjw
08/11/2017, 12:20 AMkotlin.test
is, at present, very simple and something more advanced like Spek is JVM-onlyraniejade
08/11/2017, 1:49 AMjackmiras
08/11/2017, 2:54 PMjackmiras
08/11/2017, 3:05 PMartem_zin
08/11/2017, 7:41 PMcontext
, describe
, given
) will go though full cycle of group initialization (like beforeGroup
, beforeEachTest
, memoized
with proper cache level)liamd
08/16/2017, 7:50 PMliamd
08/16/2017, 7:50 PMliamd
08/16/2017, 7:50 PMartem_zin
08/16/2017, 9:40 PMliamd
08/16/2017, 9:41 PMliamd
08/16/2017, 9:42 PMartem_zin
08/16/2017, 9:54 PM<https://github.com/winterbe/expekt>
- <https://github.com/MarkusAmshove/Kluent>
- <https://github.com/evant/assertk>
But AssertJ works well tooliamd
08/16/2017, 10:18 PMliamd
08/16/2017, 10:18 PMrobfletcher
08/16/2017, 10:38 PMartem_zin
08/16/2017, 11:45 PMjackmiras
08/18/2017, 7:21 PMgradle clean build
or gradle test
I always get the following output:
> Task :junitPlatformTest
Test run finished after 89 ms
[ 1 containers found ]
[ 0 containers skipped ]
[ 1 containers started ]
[ 0 containers aborted ]
[ 1 containers successful ]
[ 0 containers failed ]
[ 0 tests found ]
[ 0 tests skipped ]
[ 0 tests started ]
[ 0 tests aborted ]
[ 0 tests successful ]
[ 0 tests failed ]
Does anyone know why this is happening?artem_zin
08/18/2017, 7:32 PMjunitPlatform {
platformVersion '1.0.0-M4'
filters {
engines {
include 'spek'
}
}
}
jackmiras
08/18/2017, 7:36 PMartem_zin
08/18/2017, 7:41 PMjackmiras
08/18/2017, 7:42 PMjackmiras
08/18/2017, 7:42 PM// Plugin settings
buildscript {
repositories { mavenCentral() }
dependencies { classpath "org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4" }
}
plugins {
id 'application'
id 'com.heroku.sdk.heroku-gradle' version '0.2.0'
id 'org.jetbrains.kotlin.jvm' version '1.1.4'
}
apply plugin: 'org.junit.platform.gradle.plugin'
junitPlatform {
filters {
engines {
include 'spek'
}
}
}
// Project settings
group 'project-name'
version '1.2'
mainClassName = "config/api/Application"
sourceSets {
main.java.srcDirs += 'src/main/kotlin/'
test.java.srcDirs += 'src/test/kotlin/'
}
// Dependency settings
repositories {
jcenter()
maven { url "<http://dl.bintray.com/jetbrains/spek>" }
}
def kotlin_version = '1.1.4'
def spek_version = '1.1.2'
dependencies {
testCompile "org.jetbrains.spek:spek-api:$spek_version"
testRuntime "org.jetbrains.spek:spek-junit-platform-engine:$spek_version"
testRuntime 'org.junit.platform:junit-platform-launcher:1.0.0-M4'
testCompile 'com.nhaarman:mockito-kotlin:1.5.0'
testCompile 'org.amshove.kluent:kluent:1.26'
testCompile 'com.github.javafaker:javafaker:0.13'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'com.github.salomonbrys.kodein:kodein:4.1.0'
compile 'com.sparkjava:spark-core:2.6.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.6'
compile 'org.slf4j:slf4j-simple:1.7.21'
compile 'org.mongodb.morphia:morphia:1.3.2'
compile 'io.github.lukehutch:fast-classpath-scanner:2.4.2'
}
Apparently there isn't anything wrong but I'm still unable to run the tests through the terminalrattleshirt
08/24/2017, 8:20 AMadambl4
08/24/2017, 9:12 AMrattleshirt
08/24/2017, 9:35 AMleodeleon
08/31/2017, 1:28 PM