In the mabl CLI, you can programmatically manage your mobile build files for mobile testing.
mabl mobile-build-files upload
The mabl mobile-build-files upload
command uploads and creates a new mobile build file. The file input must be a relative path to the file you are uploading to your mabl workspace.
mabl mobile-build-files upload <build-file-path>
Options
Option | Details |
--branch | Branch from which this mobile app file was built. |
--labels | Space delimited labels to save the test with. |
--platform | The mobile platform. Choices: "android" or "ios". By default, the platform is inferred from the app file's binary extension. |
--version | The version of the mobile app file |
Next steps
When you upload a build file, the CLI returns a build file ID ending in -maf
. You can use this ID in additional CLI commands to run tests against the build or to associate the build with an application and environment for scheduled plan runs.
# Upload a build file that is currently under development
mabl mobile-build-files upload sample-build.apk --version 3.4
# Run plans with a build file override to test out the build
mabl deployments create -e <env-id> -a <app-id> --android-app-file-id <build-file-id>
# Upload a build file as a release candidate
mabl mobile-build-files upload sample-build.app --version 1.2
# Associate the app and environment used for scheduled plan runs with the new build file
mabl environments build-files update <env-id> --application-id <app-id> --build-file-id <build-file-id>
mabl mobile-build-files list
The mabl mobile-build-files list
command lists mobile build files uploaded to a workspace, including the mobile app file ID, platform, name, version, and date of upload for each file.
mabl mobile-build-files list
Options
Option | Details |
--limit, -l | The number of mobile app files to return. The default is 10. |
--output, -o | Specify the result output. Choices: "json", "yaml" |
Examples
# List 20 mobile app builds in the workspace
mabl mobile-build-files list --limit 20
# List 5 mobile app builds in JSON format
mabl mobile-build-files list --limit 5 --output json
mabl mobile-build-files download
The mabl mobile-build-files download
command downloads a mobile build file from a mabl workspace to your local machine. Use mabl mobile-build-files list
to get the mobile app file ID, which ends in the suffix "-maf". The destination must be a relative path to the destination directory or file.
mabl mobile-build-files download <id> <destination>
mabl mobile-build-files delete
The mabl mobile-build-files delete
command deletes a mobile build file from the mabl workspace. Use the mabl mobile-build-files list
command to get the mobile build file ID, which ends in the suffix "-maf".
mabl mobile-build-files delete <id>