Skip to content

[TECHNICAL] QA variant #3791

Closed
Closed

Description

@jesmrec

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

Activity

  1. michaelstingl commented on Nov 10, 2022

    @michaelstingl
    Contributor

    Check MDM options in the iOS app for inspiration

  2. jesmrec commented on Nov 11, 2022

    @jesmrec
    MemberAuthor

    Brandable option is valid too.

  3. added this to the 4.5 - Next milestone on Sep 30, 2024
  4. self-assigned this
    on Feb 7, 2025
  5. changed the title [-]Testing variant[/-] [+][TECHNICAL] Testing variant[/+] on Feb 7, 2025
  6. changed the title [-][TECHNICAL] Testing variant[/-] [+][TECHNICAL] Testing/QA variant[/+] on Feb 7, 2025
  7. joragua commented on Apr 10, 2025

    @joragua
    Member

    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: 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:

    buildTypes {
    
            release {
                applicationIdSuffix ".release"  
            }
    
            debug {
                applicationIdSuffix ".debug"
            }
    }
    

    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.gradle file like this:

    flavorDimensions "management"
    
    productFlavors {
    
            original {
                dimension "management"
            }
    
            mdm {
                dimension "management"
            }
    
            qa {
                dimension "management"
            }
    }
    

    Warning

    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):

    Build Type Flavor Build Variant
    debug original originalDebug
    mdm mdmDebug
    qa qaDebug
    release original originalRelease
    mdm mdmRelease
    qa qaRelease
  8. linked a pull request that will close this issue[TECHNICAL] QA variant #4569on Apr 10, 2025
  9. changed the title [-][TECHNICAL] Testing/QA variant[/-] [+][TECHNICAL] QA variant[/+] on Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions