https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
minutest
  • n

    natpryce

    09/23/2018, 8:44 AM
    Make Spring support an add-on library please! You can’t call something “minute” if it drags Spring and all its dependencies in
    d
    r
    2 replies · 3 participants
  • r

    robfletcher

    10/19/2018, 4:21 PM
    I enjoyed your KotlinConf talk by the way, and I’m a big fan of GOOS
    d
    3 replies · 2 participants
  • d

    dmcg

    10/19/2018, 8:45 PM
    @natpryce I'm thinking of moving the examples over to JUnitTests, but that is quite a commitment. How is it working for you?
    n
    14 replies · 2 participants
  • d

    dmcg

    10/20/2018, 7:01 AM
    Unit isn’t quite the same, because it says that you never have a fixture. You might want a fixture that in some tests is present and others absent. I know it was in the back of my mind when I made F : Any, but I can’t remember why I did that. Let me see if it’s still necessary.
    2 replies · 1 participant
  • n

    natpryce

    10/20/2018, 3:10 PM
    gradlew is there but the wrapper jar it requires to bootstrap gradle is not
    d
    1 reply · 2 participants
  • d

    dmcg

    10/20/2018, 10:12 PM
    So it was just too hard to explain when to use JUnitTests and JUnitFixtureTests, so I've added a JupiterTests
    object FirstMinutests : JupiterTests<Fixture>() {
        class Fixture { ... }
        override val tests = context {
            test("my first test") {
    which keeps the annotation scariness hidden for both cases at the expense of another level of indentation.
    r
    1 reply · 2 participants
  • r

    robfletcher

    10/21/2018, 12:32 PM
    Is there a practical difference between
    modifyFixture
    and
    before
    ?
    d
    4 replies · 2 participants
  • n

    natpryce

    10/21/2018, 4:01 PM
    what is the purpose of test transforms?
    d
    1 reply · 2 participants
  • d

    dmcg

    10/21/2018, 8:56 PM
    I’d have to see it - it sounds like a lot of to-ing and fro-ing compared to the current straight through pipeline. I might be able to meet in town Tuesday morning or Wednesday evening - I’m out in Paris for the night.
    n
    1 reply · 2 participants
  • d

    dmcg

    10/28/2018, 1:09 PM
    @robfletcher are you using the JUnit rules support? @natpryce has done some sterling work to simplify the internals and remove reflection, but we haven't reimplemented the rules support yet.
    r
    1 reply · 2 participants
  • n

    natpryce

    11/05/2018, 1:13 PM
    I’m still a bit wary of the “magical underscore” convention. 🦄
    d
    3 replies · 2 participants
  • c

    christophsturm

    11/05/2018, 1:58 PM
    i think people need to manually request an invite to this slack
    d
    1 reply · 2 participants
  • d

    dmcg

    11/09/2018, 8:38 AM
    @robfletcher you asked a long time ago about referencing the fixture as
    it
    . I've been playing and think that I can do this
    data class Fruit(val name: String)
            data class Conserve(val type: String, val fruit: Fruit)
    
            junitTests<Fruit> {
    
                fixture {
                    Fruit("blackcurrent")
                }
    
                derivedContext<Conserve>("inner") {
    
                    deriveFixture {
                        assertEquals("blackcurrent", this.name)
                        assertEquals("blackcurrent", it.name)
                        assertEquals("blackcurrent", parentFixture.name)
                        // Doesn't compile
                        // assertEquals("blackcurrent", fixture.name)
                        Conserve("jam", parentFixture)
                    }
    
                    test("test") {
                        assertEquals("jam", this.type)
                        assertEquals("jam", it.type)
                        assertEquals("jam", fixture.type)
                        // Doesn't compile
                        // assertEquals("blackcurrent jam", parentFixture.fruit)
                    }
                }
            }
    r
    1 reply · 2 participants
  • d

    dmcg

    11/09/2018, 9:22 AM
    @robfletcher @natpryce @christophsturm It would be good to get together for a chat about the API direction. Maybe 30 minutes of screenshare to put forward some options - we have prototypes of 2 designs. Is there a time today when we're all sitting at a computer and free? I could make pretty much any time before 2300 UTC with a bit of notice
    r
    c
    2 replies · 3 participants
  • n

    natpryce

    11/12/2018, 8:43 AM
    Also… is there any way to prevent calling context builder functions from within tests? The Dsl Marker mechanism doesn’t seem to work. Or at least, doesn’t work the way I expected it to.
    d
    1 reply · 2 participants
  • d

    dmcg

    11/13/2018, 9:43 AM
    That is cool.
    Context<PathTemplate<T>, PathTemplate<T>>
    ->
    TestContext<PathTemplate<T>>
    - it's a shame that IntelliJ doesn't offer the most specific type alias in these cases
    c
    n
    3 replies · 3 participants
  • d

    dmcg

    11/16/2018, 11:42 AM
    Make sure that your runner supports that 😉
    n
    1 reply · 2 participants
  • d

    dmcg

    11/23/2018, 5:17 PM
    The val feels pure, but at the expense of being evaluated at an indeterminate time. The fun gives us control over reporting errors
    n
    1 reply · 2 participants
  • d

    dmcg

    11/26/2018, 11:32 AM
    Also visibility
    n
    1 reply · 2 participants
  • n

    natpryce

    11/26/2018, 9:52 PM
    If
    TestDescriptor
    is actually a
    TestExecution
    , then it can register resources that need to be cleaned up at the end of the test run…
    d
    15 replies · 2 participants
  • n

    natpryce

    11/27/2018, 9:11 AM
    Which brings me back to a question I had earlier... should RuntimeContext have methods for creating a copy with different children? That’s what PlainContext allows. Should there be a published API call to make that easier?
    d
    2 replies · 2 participants
  • n

    natpryce

    11/27/2018, 9:16 AM
    But the engine could find transforms to apply when it scans the classpath
    d
    24 replies · 2 participants
  • c

    christophsturm

    12/17/2018, 10:52 PM
    thats much better
    n
    1 reply · 2 participants
  • d

    dmcg

    12/30/2018, 10:31 AM
    Version 0.36.0 fixes a bug in the JUnit 4 runner and stops publishing a dependency on JUnit 4 and the classgraph jar required by the minutesttestrunner. Ideally I'd mark these are provided, but haven't found a way to do that yet. /@christophsturm
    🎉 1
    c
    3 replies · 2 participants
  • d

    dmcg

    02/03/2019, 2:35 PM
    Anything else?
    n
    3 replies · 2 participants
  • r

    robfletcher

    02/11/2019, 6:01 PM
    One downside is that IntelliJ marks the method returning the
    RootContextBuilder
    as unused because you’re finding it with reflection-y magic
    d
    9 replies · 2 participants
  • r

    robfletcher

    02/16/2019, 4:08 PM
    @dmcg going back to our discussion about how to appropriately define fixtures, I’ve dug out a couple of examples from the codebase I’m currently working on. 1. in this case I’m just using the CUT as the fixture and other fields are class level fields: https://github.com/spinnaker/keel/blob/master/keel-plugin/src/test/kotlin/com/netflix/spinnaker/keel/plugin/monitoring/ResourceStateMonitorTests.kt 2. here’s one where I’m putting everything in a fixture object: https://github.com/spinnaker/keel/blob/master/keel-ec2-plugin/src/test/kotlin/com/netflix/spinnaker/keel/api/ec2/SecurityGroupRuleTests.kt In neither case am I very comfortable with what I’m doing.
    d
    22 replies · 2 participants
  • d

    dmcg

    02/19/2019, 1:36 PM
    Welcome @DP-TKS - please let us know how you get on
    d
    1 reply · 2 participants
  • d

    dmcg

    02/21/2019, 8:11 AM
    I like that that is an option, but dislike the knowledge that we’re repeating the same setup code just to make multiple asserts read well.
    r
    2 replies · 2 participants
  • c

    christophsturm

    02/21/2019, 10:15 AM
    i treat all code comments as bugs
    d
    1 reply · 2 participants
Powered by Linen
Title
c

christophsturm

02/21/2019, 10:15 AM
i treat all code comments as bugs
d

dmcg

02/21/2019, 10:16 AM
I tend to agree - in this case I'm talking to myself
View count: 2