From 0480e8ddb9cc7f8f04df968cf43873e7fc6c8413 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Mon, 27 Jan 2025 13:54:22 -0800 Subject: [PATCH] Add doc for android startup scenario local testing. --- docs/android-startup-scenarios.md | 35 +++++++++++++++++++++++++++++++ docs/scenarios-workflow.md | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 docs/android-startup-scenarios.md diff --git a/docs/android-startup-scenarios.md b/docs/android-startup-scenarios.md new file mode 100644 index 00000000000..c66fa3ffbdc --- /dev/null +++ b/docs/android-startup-scenarios.md @@ -0,0 +1,35 @@ + +## Android Startup Test + +### Prereqs + +- Ensure `dotnet` is installed and available with the `dotnet` command. [Dotnet Download](https://dotnet.microsoft.com/en-us/download) or [Daily Dotnet Download](https://github.com/dotnet/sdk/blob/main/documentation/package-table.md) +- Ensure `xharness` is installed and available with the `xharness` command. The current version in use can be found in the `eng/performance/maui_scenarios_android.proj` file at line 7 (under the tag `MicrosoftDotNetXHarnessCLIVersion`), although any recent version should work. [XHarness Install Instructions](https://github.com/dotnet/xharness?tab=readme-ov-file#installation-and-usage). +- Have an Android app APK available for testing. + +### Steps + +1. Initialize the environment (note the . for bash): + + ```sh + cd src/scripts + . ./init.sh # or .\init.ps1 on Windows + cd ../ + ``` + +2. Navigate to the `helloandroid` scenario directory: + + ```sh + cd ./scenarios/helloandroid + ``` + +3. Copy the APK into the `helloandroid` directory. +4. Run the test: + + ```sh + python test.py devicestartup --device-type android --package-path /.apk --package-name [--disable-animations] + ``` + +### Notes + +- Example commands and additional logic can be found in the `maui_scenarios_android.proj` and `runner.py` files in the `performance` repository. diff --git a/docs/scenarios-workflow.md b/docs/scenarios-workflow.md index b57191933a7..793bddc772d 100644 --- a/docs/scenarios-workflow.md +++ b/docs/scenarios-workflow.md @@ -12,6 +12,7 @@ This is a general guideline on how the scenario tests are arranged in this repo. - [How to run SDK scenario tests](./sdk-scenarios.md) - [How to run Crossgen scenario tests](./crossgen-scenarios.md) - [How to run Blazor tests](./blazor-scenarios.md) +- [How to run Android Startup tests](./android-startup-scenarios.md) - [How to run other Scenario tests](./basic-scenarios.md) ### Prerequisites @@ -138,4 +139,5 @@ Some command options are only applicable for certain test assets. Refer to the c - [SDK Command Matrix](./sdk-scenarios.md#command-matrix) - [Crossgen Command Matrix](./crossgen-scenarios.md#command-matrix) - [Blazor Command Matrix](./blazor-scenarios.md#command-matrix) +- [How to run Android Startup tests](./android-startup-scenarios.md) - [Other Scenarios Command Matrix](./basic-scenarios.md#command-matrix)