Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

run-device-tests

БесплатноЗапускает вложенные скриптыНе проверен

Build and run native MAUI device tests with plain dotnet test, explicit devices, native xUnit selection and genuine MTP TRX.

dotnetот dotnet★ 23 319 звёзд на GitHub

Об этом скилле

Run device tests

Use scripts/Run-DeviceTests.ps1 for Controls, Core, Essentials, Graphics or BlazorWebView. macOS supports iOS, Mac Catalyst and Android; Windows supports Android and unpackaged Windows. The repository SDK/workloads, built build tasks and native SDK tools are prerequisites. XHarness is not used.

pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -iOSVersion 26 -TestFilter Category=Shell
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -DeviceUdid emulator-5554
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform maccatalyst -IncludeClasses Microsoft.Maui.DeviceTests.WindowHandlerTests -IncludeMethods Runs -Rebuild
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform windows -BuildOnly
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform windows -WindowsPackaging packaged

Parameters

Existing parameters remain supported: Project, Platform, iOSVersion, Configuration (Release), Rebuild, TestFilter, IncludeClasses, IncludeMethods, BuildOnly, OutputDirectory (artifacts/log), Timeout (01:00:00), DeviceUdid, and SkipXcodeVersionCheck. WindowsPackaging selects unpackaged (the existing default) or packaged. Optional RepoRoot and DotnetPath select an explicit checkout/SDK. Use ProjectPath instead of Project for another native test application inside the selected checkout, including the device-test sample. Optional TargetFramework preserves an explicitly selected platform TFM; it must match Platform. Windows Cake callers use these parameters rather than duplicating package activation or report validation.

Without DeviceUdid, the runner provisions a unique iOS simulator or Android API 33 emulator using SDK tools, records its identity and cleans up only that resource. Supplying an exact UDID/serial borrows that device without deleting or stopping it. iOS major-version requests select an installed matching runtime; unavailable runtimes fail rather than silently changing the requested OS. Android SDK licenses must already be accepted. In Azure CI, SDK package preparation uses the shared Install-AndroidSdkPackage.ps1 policy: at most five attempts per package, with partial-download cleanup between attempts. SDK discovery must match the selected SDK before any package changes. Preparation restores originally absent SDK-user/temp variables as absent, not empty; native Android tools interpret empty temp paths as filesystem-root paths. Local startup still invokes sdkmanager once; tests and emulator boot are not retried. Android cleanup derives its executable from the configured SDK and rejects a persisted executable path that differs from that SDK's adb. PID cleanup additionally checks the actual emulator command line for the owned AVD argument before waiting for or terminating a still-running process. The owned iOS simulator uses iPhone 11 Pro, or iPhone 16 when the runtime no longer supports the older profile. latest selects the newest installed runtime compatible with one of those standard-phone profiles, not a device-specific runtime supporting only iPhone Duo. Explicit versions remain exact and fail provisioning when neither profile is supported; they never fall back to another version. The selected runtime version, build and device type are logged and recorded in device.json. Foldable/regular-width coverage requires a separate, explicitly configured lane. Cleanup revalidates the individual UUID and recorded unique name; aggregate selectors and foreign simulator state cannot reach deletion.

TestFilter accepts Category=X or SkipCategories=X,Y,Z. IncludeClasses accepts comma/semicolon-separated class FQNs; IncludeMethods accepts simple method names with class scope, or class-qualified methods. Selection becomes validated MauiTestFilter, MauiTestClasses and MauiTestMethods MSBuild metadata. Commas/semicolons are escaped for MSBuild. There is no source injection, category-index loop, or post-hoc acceptance of a broad suite: genuine TRX identities must demonstrate exact target isolation, including every requested class/method. Theory rows retain their real identities.

Rebuild rebuilds the full project-reference graph before dotnet test --no-build, so Gate A/B attempts cannot accidentally reuse the other revision's dependencies. Every invocation has a unique child result directory, even when reusing the same OutputDirectory.

Reporting and failure contract

Android and Windows use host --report-trx --results-directory. The Android SDK proxy rewrites method identities to display names. The local runner also pulls the app's original files/TestResults/testResults.trx from external storage using the project's literal ApplicationId and exact device serial. That native report alone supplies counts and selec

Полный SKILL.md на GitHub

Установить run-device-tests в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/Run-DeviceTests.Tests.ps1scripts/Run-DeviceTests.ps1scripts/Start-TestDevice.ps1scripts/Stop-TestDevice.ps1scripts/WindowsTestPackage.Tests.ps1scripts/WindowsTestPackage.ps1scripts/windows-launcher/PackagedTestSession.csscripts/windows-launcher/Program.csscripts/windows-launcher/WindowsPackageInterop.csscripts/windows-launcher/WindowsTestCommandLine.csscripts/windows-launcher/WindowsTestLauncher.csproj

FAQ

Что делает скилл run-device-tests?

Build and run native MAUI device tests with plain dotnet test, explicit devices, native xUnit selection and genuine MTP TRX.

Как установить скилл run-device-tests?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл run-device-tests запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить run-device-tests с