-
Notifications
You must be signed in to change notification settings - Fork 280
Add doc for android startup scenario local testing. #4664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
081ab90
68eb904
3038ee9
f0b7cc6
847f4b8
c72d44a
a1bc126
bb29a98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 for easy xharness installation. Any supported .NET Core version should work. [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. | ||
- Have an Android Device (with developer mode enabled) or emulator connected to computer, and viewable with `xharness android device` or `xharness android adb -- devices -l`. | ||
|
||
## Steps | ||
|
||
1. Initialize the environment (note the . for bash): | ||
|
||
```sh | ||
cd src/scenarios | ||
. ./init.sh # or `.\init.ps1` on Windows | ||
``` | ||
|
||
2. Navigate to the `helloandroid` scenario directory: | ||
|
||
```sh | ||
cd helloandroid | ||
``` | ||
|
||
3. Copy the APK into the `helloandroid` directory. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any correlation between dotnet version used for building the .apk and the one used as part of the environment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script should work with any .apk, cc: @LoopedBard3 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should not be any correlation if using a separately built APK. There are scenarios that this does not currently cover where the dotnet version would matter, e.g. when building Maui apps with pre.py the dotnet version will matter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am a bit confused, could you please clarify:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The doc is more general for any APK, so I went ahead and added a new scenario folder named genericandroidstartup to make it more clear that it can be used for any APK. The reason we have the specific scenarios for some of the other apps is some of the pre.py files can build the apps (like the mauiandroid), but most of the test.py's for the android testing are interchangeable. |
||
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] | ||
LoopedBard3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add information about where the results of the performance test can be found or an example of what the output should look like. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added section on this. |
||
## Notes | ||
|
||
- Example commands and additional logic can be found in the `maui_scenarios_android.proj` and `runner.py` files in the `performance` repository. | ||
ivanpovazan marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.