https://kotlinlang.org logo
Title
u

ursus

12/06/2019, 9:49 PM
In Android, what is the difference between
testDebugUnitTest
and
testReleaseUnitTest
? Afaik you cannot run unit tests on a proguared release etc.?
t

trevjones

12/06/2019, 10:37 PM
the different variants create different source sets, each of which may have different implementations that need to be tested.
R8 handles dexing/shrinking later in the build chain so what you end up running in a testReleastUnitTest is .class files on the jvm just the same as debug. androidTest with a release variant might start to get weird, but certainly it can be done with some level of effort applied.
u

ursus

12/06/2019, 10:43 PM
I see, so in case I have different tests in src/debug or /release? Which I dont so they default to main?
t

trevjones

12/06/2019, 10:44 PM
correct
u

ursus

12/06/2019, 10:44 PM
however, isnt /test on the same level as /main? where would I stick the /release folder there, seems like a level before that
src/main src/test src/androidTest is what I have
t

trevjones

12/06/2019, 10:45 PM
similar to how it would be src/debug, you would have a src/testDebug. the tests ran are the set of test and testDebug
u

ursus

12/06/2019, 10:45 PM
ok nevermind, it works anyways, thanks althought it does feel like a parent modifier to me
thank you
t

trevjones

12/06/2019, 10:45 PM
np