dmcg
03/28/2019, 4:23 PMmgrzechocinski
04/02/2019, 3:10 PMAbbas A
04/03/2019, 10:25 AMbeforeGroup
is executed only once even if test has more then one group on one level? And if so, how do you work with this?Shan
04/06/2019, 6:46 PMsrc > commonMain, commonTest, jvmMain, jvmTest
format (I'm only trying to run the tests with jvmTest source set)Shan
04/07/2019, 7:38 PMjvmTest
task in a Kotlin MP projectJoakimForslund
04/09/2019, 2:51 PMdewildte
04/13/2019, 12:51 AMmartin.petrulak
04/15/2019, 9:26 PMragunathjawahar
05/02/2019, 2:28 AMCanaryTest.kt
package dev.ragunath.spek2
import com.google.common.truth.Truth.assertThat
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
class CanaryTest : Spek({
describe("A test environment") {
it("is ready to run tests") {
assertThat("a").isEqualTo("b") // <- Failing assertion.
}
}
})
Also, here is my build.gradle
.
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.31'
}
group 'dev.ragunath'
version '0.1.0-SNAPSHOT'
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'io.arrow-kt:arrow-core-data:0.9.0'
// Spek
testImplementation 'org.spekframework.spek2:spek-dsl-jvm:2.0.3'
testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:2.0.3"
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:1.3.31"
// Truth
testImplementation 'com.google.truth:truth:0.44'
}
compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
}
svenjacobs
05/08/2019, 12:08 PMsvenjacobs
05/08/2019, 12:13 PMrobstoll
05/15/2019, 7:30 PMinclude
from 1.x, can you give me a pointer how I should implement it in 2.x and would you be interested in a pull request?robstoll
05/16/2019, 5:48 AMrobstoll
05/18/2019, 6:35 PMaction
is no longer available in 2.x what is now the idiomatic way of writing dependent tests? Following an example how I used it in spek 1.x:
action("calling peek for the first time") {
val obj = object : Any() {}
val itr = listOf(obj).iterator().toPeekingIterator()
val result = itr.peek()
it("returns the element") {
assert(result).isSameAs(obj)
}
it("calling it a second time still returns the same element") {
val result2 = itr.peek()
assert(result2).isSameAs(obj)
}
it("calling hasNext returns true") {
assert(itr.hasNext()).toBe(true)
}
it("calling next returns the same element") {
assert(itr.next()).isSameAs(obj)
}
it("calling then hasNext returns false") {
assert(itr.hasNext()).toBe(false)
}
}
tapchicoma
05/27/2019, 7:54 AM2.0.5
release is missingtapchicoma
05/30/2019, 10:01 AMTrevor Ackerman
06/24/2019, 7:01 PMJoakimForslund
07/24/2019, 2:15 PMorg.host.class.someSpek > Settings randomId = 1234567 FAILED
org.junit.ComparisonFailure at spektest.kt:21
Is a bit lack luster, I'd want it to type out the expected value. Is there any way to do that?robstoll
07/25/2019, 7:25 PMv79
08/11/2019, 8:05 AMdescribe
or it
blocks. As it is, even if I run a single it
block test in Intellij, all the mocks across all blocks are being initialized. Is this a consequence of putting the entire test suite into the constructor of my test class (which seems bonkers to me)?Big Chungus
09/25/2019, 10:50 AMBig Chungus
09/25/2019, 10:52 AMBig Chungus
09/26/2019, 5:59 AMShan
12/03/2019, 1:11 AMTest framework quit unexpectedly
error I am getting when trying to run a test? Can't seem to find any error statements anywhere. Using v2.0.8 with an Android module, junit5 plugin is applied, have all the dependencies added correctly. 🤔edwinRNDR
12/10/2019, 7:58 PMFranz See
01/01/2020, 8:20 AMfun getOrCreateServer() {
...
Runtime.getRuntime().addShutdownHook(Thread(Runnable {
server.shutdown();
}))
return server
}
Then in my tests, I would just call this method to get the server instance and do stuff with it. Then after all tests have executed, this would be called to shutdown the server
In Spek2, this does not get called
How do I what I want to do in Spek2? 🙂codeslubber
01/06/2020, 11:57 PMShan
01/26/2020, 9:33 PMlucasqueiroz
02/06/2020, 3:19 PMjk2018
02/15/2020, 4:44 AMtestLogging.events = ["passed", "skipped", "failed"]
in Kotlin KTS.. Anyone got a hint?