Command-line utilities used by Android partners to run packaged Mobly tests and upload test results.
Project description
Mobly Android Partner Tools
This is a suite of command-line tools used for Android partner testing based on the Mobly framework.
Use cases include the BeToCQ test suite.
Requirements
- Python 3.11 or above
Installation instructions
If you have already installed a test suite that includes these tools, such as BeToCQ, you may skip this step.
Open a new terminal and run the following installation commands.
# on Linux
python3 -m venv venv
source venv/bin/activate
python3 -m pip install mobly-android-partner-tools
:: on Windows
python -m venv venv
venv\Scripts\activate
python -m pip install mobly-android-partner-tools
Mobly test runner
The Mobly test runner is a tool that serves as the entry point for executing a given Mobly test or suite. It is designed with a focus on simplicity and flexibility.
The runner analyzes the contents of a Mobly test package, performs test environment setup/teardown, and executes the test.
As a basic usage example:
mobly_runner my_test_suite
executes the installed Mobly test suite my_test_suite.
For more details, please refer to the CLI options in mobly_runner -h.
Results uploader
The Results Uploader is a tool for generating shareable UI links for automated test results.
It uploads test-generated files to Google Cloud Storage, and presents the results in an organized way on a dedicated web UI (Resultstore/BTX). The result URL can then be shared to anyone who is given access (including both Google and non-Google accounts), allowing for easy tracking and debugging.
First-time setup
To start using the Results Uploader, you need to be able to access the shared Google Cloud Storage bucket:
- Confirm/request access to the shared GCP project with your Google contact. The Googler will give you a project name to use.
- Install the gcloud CLI from https://cloud.google.com/sdk/docs/install
- If installation fails with the above method, try the alternative linked here.
- Download and execute this script to log into the GCP project, and set up local credentials.
How to upload results
-
At the end of a completed test run, you'll see the final lines on the console output as follows. Record the folder path in the line starting with "Artifacts are saved in".
Total time elapsed 961.7551812920001s Artifacts are saved in "/tmp/logs/mobly/Local5GTestbed/10-23-2023_10-30-50-685" Test summary saved in "/tmp/logs/mobly/Local5GTestbed/10-23-2023_10-30-50-685/test_summary.yaml" Test results: Error 0, Executed 1, Failed 0, Passed 1, Requested 0, Skipped 0 -
Run the uploader command, setting the
artifacts_folderas the path recorded in the previous step.results_uploader <artifacts_folder> -
If successful, at the end of the upload process you will get a link beginning with http://btx.cloud.google.com. Simply share this link to others who wish to view your test results.
Automatically upload results upon test completion
To automatically upload results upon test completion, use the
mobly_runner to execute your tests, and
add the following command-line option:
mobly_runner my_test_suite --upload_results
Note: You must have completed the uploader First-time setup prior to using this option, or the upload will automatically be aborted.
Batch uploading
If you run
results_uploader <folder_containing_multiple_mobly_artifacts>
The tool automatically searches recursively for all Mobly artifact folders contained within this directory, and creates a single BTX link with a sub-entry for each folder.
You may use this feature to quickly share a set of related Mobly runs.
Troubleshooting
- If the link is missing, or the contents of the link are empty, check the
debug logs of the uploader. Its location is shown at the beginning of the
tool's output indicated by
Debug logs are saved to: .... - Report any tool issues to Google and attach all tool output, including the debug logs.
Additional reference
To see a list of supported options, please consult results_uploader --help.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mobly_android_partner_tools-1.5.0.tar.gz.
File metadata
- Download URL: mobly_android_partner_tools-1.5.0.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db89c863d8046b00e53f8d441757502c2f26a52448e1543f6ea398a45f9f565b
|
|
| MD5 |
e2e2c4b342cb8b905438b3c5919c5445
|
|
| BLAKE2b-256 |
4ec36435c27d60f9e21a41d33ec14261038d7151927c046d12ea1dcb08f3d615
|
Provenance
The following attestation bundles were made for mobly_android_partner_tools-1.5.0.tar.gz:
Publisher:
publish.yml on android/mobly-android-partner-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mobly_android_partner_tools-1.5.0.tar.gz -
Subject digest:
db89c863d8046b00e53f8d441757502c2f26a52448e1543f6ea398a45f9f565b - Sigstore transparency entry: 708944913
- Sigstore integration time:
-
Permalink:
android/mobly-android-partner-tools@87317985744064688d21fe8d5445f859f81887b9 -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/android
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@87317985744064688d21fe8d5445f859f81887b9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mobly_android_partner_tools-1.5.0-py3-none-any.whl.
File metadata
- Download URL: mobly_android_partner_tools-1.5.0-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4579c79bdf0e3e672600dab037b2d0bc414e0e85ed2b19e8cb363d570839d4b7
|
|
| MD5 |
79734b02b19cae8aa2dc5288880e8434
|
|
| BLAKE2b-256 |
9c7877417b94b5713af0c1f6b259b027bef36b4491ac4f94d414ad6de4760429
|
Provenance
The following attestation bundles were made for mobly_android_partner_tools-1.5.0-py3-none-any.whl:
Publisher:
publish.yml on android/mobly-android-partner-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mobly_android_partner_tools-1.5.0-py3-none-any.whl -
Subject digest:
4579c79bdf0e3e672600dab037b2d0bc414e0e85ed2b19e8cb363d570839d4b7 - Sigstore transparency entry: 708944917
- Sigstore integration time:
-
Permalink:
android/mobly-android-partner-tools@87317985744064688d21fe8d5445f859f81887b9 -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/android
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@87317985744064688d21fe8d5445f859f81887b9 -
Trigger Event:
release
-
Statement type: