Skip to content

Commit

Permalink
Add doc for android startup scenario local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
LoopedBard3 committed Jan 27, 2025
1 parent f922701 commit 131d373
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/android-startup-scenarios.md
Original file line number Diff line number Diff line change
@@ -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 <path to apk (e.g. .)>/<apkname>.apk --package-name <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.
2 changes: 2 additions & 0 deletions docs/scenarios-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 131d373

Please sign in to comment.