You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to make easier automation tasks, it would be helpful to create a new variant in the project, called test, testing or similar.
Now, when some authentication methods are supported in the same server (Bearer, Basic), by default the app takes the safer one (Bearer). So, if OAuth2 and OIDC are available, they are selected by default and Basic is the fallback option.
The new variant should do the opposite. In case basic auth is available, basic should be used by default and most prior. Only that change, the same as Release variant if posible. With this change, autom test will avoid jumping to the browser, getting rid of an annoying dependence of the available version and preventing the context change and the driver loading.
Also, it'd be interesting to remove scoped storage, so that it's posible to handle local files for actions and assertions.
So, these are the interesting changes for a testing release:
Welcome wizard disabled
Release notes disabled
Basic auth by default in the app
Scoped storage disabled
Screen protection disabled
Is this feasible?
TASKS
Research (if needed)
Create branch technical/testing_variant
Development tasks
Create new flavor
Disable welcome wizard
Disable release notes
Disable screen protection
Set basic auth as default login method
Disable scoped storage
Code review and apply changes requested
Design test plan
QA
Merge branch technical/testing_variant into master
A build type defines how your app is built, packaged and signed for different purposes. For example, a version used for development doesn't need the same level of security as a version uploaded in Google Play. Android provides two default build types: release and debug. The first one (release) is optimized and signed with production key (intended for production builds). The second one (debug) includes debugging tools, is not optimized for performance and is signed with a debug key. Build types are defined in the build.gradle file inside the android block:
A flavor is a custom configuration of your app, used to build different versions from the same codebase. You can use a flavor to offer paid/free versions, build client-specific apps, support region-specific configurations, etc... They are also called product flavors. All flavors must belong to a named flavor dimension (group of product flavors). You must assign all flavors to a dimension; otherwise, you will get a build error. If you want to create a flavor you have to modify build.gradle file like this:
A flavor can't contain test, testing or a similar word in its name.
Moreover, the FLAVOR property of the BuildConfig class must be used to determine the behavior of the code depending on the flavor that you want to use:
if (BuildConfig.FLAVOR == "qa") {
// Do something
}
What is a build variant?
Build variants are the result of Gradle using a specific set of rules to combine settings, code, and resources configured in your build types and product flavors. The number of build variants Gradle creates is equal to the product of the number of flavors in each flavor dimension and the number of build types you configure. In ownCloud, after the changes, there are 6 different build variants (2 build types and 3 flavors):
Activity
michaelstingl commentedon Nov 10, 2022
Check MDM options in the iOS app for inspiration
jesmrec commentedon Nov 11, 2022
Brandable option is valid too.
[-]Testing variant[/-][+][TECHNICAL] Testing variant[/+][-][TECHNICAL] Testing variant[/-][+][TECHNICAL] Testing/QA variant[/+]joragua commentedon Apr 10, 2025
Summary
Official documentation: https://developer.android.com/build/build-variants
What is a build type?
A build type defines how your app is built, packaged and signed for different purposes. For example, a version used for development doesn't need the same level of security as a version uploaded in Google Play. Android provides two default build types:
releaseanddebug. The first one (release) is optimized and signed with production key (intended for production builds). The second one (debug) includes debugging tools, is not optimized for performance and is signed with a debug key. Build types are defined in thebuild.gradlefile inside theandroidblock:What is a flavor?
A flavor is a custom configuration of your app, used to build different versions from the same codebase. You can use a flavor to offer paid/free versions, build client-specific apps, support region-specific configurations, etc... They are also called product flavors. All flavors must belong to a named flavor dimension (group of product flavors). You must assign all flavors to a dimension; otherwise, you will get a build error. If you want to create a flavor you have to modify
build.gradlefile like this:Warning
A flavor can't contain
test,testingor a similar word in its name.Moreover, the
FLAVORproperty of theBuildConfigclass must be used to determine the behavior of the code depending on the flavor that you want to use:What is a build variant?
Build variants are the result of Gradle using a specific set of rules to combine settings, code, and resources configured in your build types and product flavors. The number of build variants Gradle creates is equal to the product of the number of flavors in each flavor dimension and the number of build types you configure. In ownCloud, after the changes, there are 6 different build variants (2 build types and 3 flavors):
[-][TECHNICAL] Testing/QA variant[/-][+][TECHNICAL] QA variant[/+]