In Android, what is the difference between `testDe...
# gradle
u
In Android, what is the difference between
testDebugUnitTest
and
testReleaseUnitTest
? Afaik you cannot run unit tests on a proguared release etc.?
t
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
I see, so in case I have different tests in src/debug or /release? Which I dont so they default to main?
t
correct
u
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
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
ok nevermind, it works anyways, thanks althought it does feel like a parent modifier to me
thank you
t
np
295 Views