Command Palette

Search for a command to run...

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

run-integration-tests

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

Build, pack, and run .NET MAUI integration tests locally. Validates templates, samples, and end-to-end scenarios using the local workload.

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

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

Run Integration Tests Skill

Build the MAUI product, install local workloads, and run integration tests.

When to Use

  • User asks to "run integration tests"
  • User asks to "test templates locally"
  • User asks to "validate MAUI build with templates"
  • User wants to verify changes don't break template scenarios
  • User asks to run specific test categories (WindowsTemplates, Samples, Build, Blazor, etc.)

Available Test Categories

Category Platform Description
Build All Basic template build tests
WindowsTemplates Windows Windows-specific template scenarios
macOSTemplates macOS macOS-specific scenarios
Blazor All Blazor hybrid templates
MultiProject All Multi-project templates
Samples All Sample project builds
AOT macOS Native AOT compilation
RunOnAndroid macOS Build, install, run on Android emulator
RunOniOS macOS iOS simulator tests

Scripts

All scripts are in .github/skills/run-integration-tests/scripts/

Run Integration Tests (Full Workflow)

# Run with specific category
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "WindowsTemplates"

# Run with Release configuration
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "Samples" -Configuration "Release"

# Run with custom test filter
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -TestFilter "/*/*/*/*BuildSample*"

# Skip build step (if already built)
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "Build" -SkipBuild

# macOS: Skip Xcode version check (for version mismatches)
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "macOSTemplates" -SkipBuild -SkipInstall -SkipXcodeVersionCheck

# Auto-provision SDK if not found (first-time setup)
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "Build" -AutoProvision

Parameters

Parameter Required Default Description
-Category No - Test category to run (WindowsTemplates, Samples, Build, etc.)
-TestFilter No - Native xUnit query filter, e.g. /*/*/AppleTemplateTests/RunOniOS_MauiDebug_CoreCLR
-TestClass No - Fully qualified xUnit class names; cannot combine with -TestFilter
-DotnetPath No .dotnet/dotnet Alternate outer-host SDK executable; requires -SkipBuild -SkipInstall
-ArtifactsDirectory No Repository default Isolated outer-host build artifacts directory
-Configuration No Debug Build configuration (Debug/Release)
-SkipBuild No false Skip build/pack step if already done
-SkipInstall No false Skip workload installation if already done
-SkipXcodeVersionCheck No false Skip Xcode version validation (macOS)
-AutoProvision No false Automatically provision local SDK if not found
-ResultsDirectory No artifacts/integration-tests Directory for test results

Workflow Steps

The script performs these steps:

  1. Build & Pack: .\build.cmd -restore -pack -configuration $Configuration
  2. Install Workloads: .dotnet\dotnet build .\src\DotNet\DotNet.csproj -t:Install -c $Configuration
  3. Extract Version: Reads MAUI_PACKAGE_VERSION from installed packs
  4. Run Tests: .dotnet\dotnet test --project ... -- --filter-trait "Category=$Category" --report-trx

Example Usage

# Run WindowsTemplates tests
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "WindowsTemplates"

# Run Samples tests
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -Category "Samples"

# Run multiple categories
pwsh .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 -TestFilter "/*/*/*/*[Category=Build|Category=Blazor]"

Focused host-helper tests without an in-tree workload

The launch-contract tests do not build generated applications. An installed SDK with MAUI packs can run just those classes using -DotnetPath; this does not change SDK pins or install workloads. Full template tests still require the repository-local .dotnet SDK and packaged MAUI artifacts.

& .github/skills/run-integration-tests/scripts/Run-IntegrationTests.ps1 `
  -TestClass @(
    "Microsoft.Maui.IntegrationTests.AppLaunchTests",
    "Microsoft.Maui.IntegrationTests.AppleLaunchTests",
    "Microsoft.Maui.IntegrationTests.AndroidLaunchTests",
    "Microsoft.Maui.IntegrationTests.SimulatorTests"
  ) `
  -DotnetPath /usr/local/share/dotnet/dotnet `
  -ArtifactsDirectory artifacts/integration-validation `
  -SkipBuild -SkipInstall

Prerequisites

  • Windows for WindowsTemplates, macOS for macOSTemplates/RunOniOS/RunOnAndroid
  • .NET SDK (version from global.json)
  • Sufficient
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

scripts/Run-IntegrationTests.ps1

FAQ

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

Build, pack, and run .NET MAUI integration tests locally. Validates templates, samples, and end-to-end scenarios using the local workload.

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

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

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

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

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

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