fladle icon indicating copy to clipboard operation
fladle copied to clipboard

auto-detect apk path is not respected if multiple variants configured in configs

Open witchlock opened this issue 6 years ago • 4 comments

fladle {
    serviceAccountCredentials(testLabApiKey)

    devices = [
        new Device("Pixel2", 28, null, null)
    ]    

    configs {
        one {
            variant = "one-debug"            
        }
        two {
            variant = "two-debug"            
        }
    }
}

Running runFlankOne or runFlankTwo is expected to get the right app and test path however it will choose a random variant during auto-detection

witchlock avatar Jun 28 '19 00:06 witchlock

Hey, interesting bug. I'm not sure there is any mapping or guarantee between the configs and the build variants. If you set the path explicitly does it work?

What would be the expected behavior of detecting and matching configs and variants?

runningcode avatar Jun 28 '19 08:06 runningcode

Sorry it took so long to look at this bug. This feature isn't supported. I could build it if needed, but maybe additionalTestApks is a better option? https://runningcode.github.io/fladle/configuration/#additionaltestapks

runningcode avatar May 16 '20 21:05 runningcode

Hey sorry this took a while to get a real response. I took a first stab at this and realized it is impossible to know if the variants should auto-detect the apk since they will already have the apk set and configured from the root.

runningcode avatar Apr 02 '21 22:04 runningcode

So, is it not possible to have the variant configured in the configs block?

I have a small project here where it does not select the right apks.

juliocbcotta avatar Aug 09 '21 09:08 juliocbcotta