-
Notifications
You must be signed in to change notification settings - Fork 5
CLI Device Runner for Mac Catalyst using XHarness
Matthew Leibowitz edited this page Jul 25, 2023
·
1 revision
Before running any tests on the CLI, you will need the XHarness .NET tool. For more information as to what that is and what it does, see the Using XXarness wiki.
- Build the app package for testing:
dotnet build <path/to/app.csproj> -f net7.0-maccatalyst -r <runtime-identifier> -c Debug
- Run the tests:
xharness apple test --target maccatalyst --app <path/to/app.app> --output-directory <path/to/output>
- View test results in the output path:
<path/to/output>/xunit-test-maccatalyst-<YYYYMMDD>_<HHMMSS>.xml
To build and test the app at the path sample/SampleMauiApp/SampleMauiApp.csproj
and get the test output at the path artifacts
on my ARM64 Apple Silicon laptop:
dotnet build sample/SampleMauiApp/SampleMauiApp.csproj \
-f net7.0-maccatalyst \
-r maccatalyst-arm64 \
-c Debug
xharness apple test \
--target maccatalyst \
--app sample/SampleMauiApp/bin/Debug/net7.0-maccatalyst/maccatalyst-arm64/SampleMauiApp.app \
--output-directory artifacts
# test result file will be artifacts/xunit-test-maccatalyst-########_######.xml