android测试是否支持口味和构建类型变体?

android测试是否支持口味和构建类型变体?

    flavorDimensions "foo"
    productFlavors {
        full {
            dimension "foo"
        }

        trial {
            dimension "foo"
        }
    }

如果只有src / androidTest / java,要测试哪个变体?

最佳答案
您可以在src / androidTestFull和src / androidTestTrial中针对特定口味创建测试.所有口味通用的所有测试都在src / androidTest中进行.

The instrumented tests in src/androidTest/ source set are shared by all build variants. When building a test APK for the “MyFlavor” variant of your app, Gradle combines both the src/androidTest/ and src/androidTestMyFlavor/ source sets.

Source

转载注明原文:android测试是否支持口味和构建类型变体? - 代码日志