@sdeleuze All my Spring Boot tests are fully written in Kotlin and I am having trouble with context caching. I was wondering how it's supposed to work. I have overall 2 different context (A, B), each has a few tests (denoted by numbers).
It runs like this:
Copy code
Context A starts
Test A1 runs
Test A2 runs
Context B starts
Test B1 runs
Test B2 runs
Context A starts
Test A3 runs
Is this the expected behaviour? I was expecting Spring Boot to "group" the tests by context, but I guess it's just running in whatever order JUnit decided?
s
sdeleuze
03/16/2018, 2:06 PM
I think yes
d
dh44t
03/16/2018, 2:34 PM
Me too
p
poohbar
03/16/2018, 2:51 PM
Thanks
n
nfrankel
03/16/2018, 2:55 PM
if you want to order your tests
you need to use testng
junit is for unit testing
and hence assumes no order
p
poohbar
03/16/2018, 3:33 PM
I don't care about the order. I just expected the
SpringRunner
to be smart enough to properly order the tests to maximize context reuse.