https://kotlinlang.org logo
#minutest
Title
# minutest
d

dmcg

10/24/2019, 9:12 AM
Also, there is experimental support for taking a list of fixtures and flattening it for a context https://github.com/dmcg/minutest/blob/master/core/src/test/kotlin/dev/minutest/examples/experimental/FlatteningExampleTests.kt
u

Uberto Barbini

11/18/2019, 10:20 PM
Hi Duncan, I've tried this today but it doesn't seem to work: it only run the test witht he first element of the sequence. I'm using your own example with 1.10.0
It's not a big deal if you decided not to continue on this road
@dmcg it's very easy to do the loop myself on the fixture
d

dmcg

11/19/2019, 6:57 PM
Hmm, it’s working for me - if you
println(this)
in before you should see 3 lots of one two three.
FlatteningTests also passing.
u

Uberto Barbini

11/22/2019, 3:31 PM
This is my current implementation. I liked it a lot
and this is my loop
Copy code
context("${app.name}") {
        fixture { app }
        actions
            .forEach { actionValidation ->
                test("${actionValidation.toTestName()}") {
                    actionValidation.execute(app)
                }
            }
    }
I would like to get rid of the "minutests()" test name but I was still unable to do it
d

dmcg

11/23/2019, 9:09 PM
I think that’s just the way I’d do it. Unfortunately minutests() is an artefact of JUnit. You could try @natpryce’s runner - you’ll have on-site support!
❤️ 1
u

Uberto Barbini

11/25/2019, 10:25 AM
I was playing with the idea to add the @testFactory annotation directly on my test. It's a reasonable compromise in order to beautify the output.
d

dmcg

11/26/2019, 8:26 AM
Yes, you can do that!
2 Views