agentleFS
IvanJosipovicIvanJosipovic/KubeUI/.agents/skills/kube-ui-testing/SKILL.md

kube-ui-testing

Skill327 starsChanged 2 months agoMITView on GitHub

Run and target KubeUI tests from the command line with Microsoft.Testing.Platform, including project, solution, class, and method selection.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for KubeUI test runs, focused test selection, test-result diagnosis, and adding tests for new behavior.

    line 8
  2. Very specific:

    Run commands from the repository root.

    line 10
  3. Distinctive:

    Run the narrowest relevant test scope first, then widen to the project or solution when the focused run passes.

    line 20
  4. Very specific:

    Treat a run that executes zero tests as invalid validation.

    line 21
  5. Distinctive:

    Use the project target with a fully qualified class filter:

    line 45
  6. Distinctive:

    Use a fully qualified method filter:

    line 59
  7. Very specific:

    Use the fully qualified class or method name returned by --list-tests when selecting another target.

    line 65
  8. Very specific:

    Use [AvaloniaFact] only for tests that require Avalonia.

    line 80
  9. Very specific:

    Do not use Task.Delay or Thread.Sleep.

    line 81
  10. Very specific:

    Use the production Kubernetes client with the shared fake transport for deterministic local tests.

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

KubeUI testing

Use this skill for KubeUI test runs, focused test selection, test-result diagnosis, and adding tests for new behavior.

Run commands from the repository root. KubeUI targets .NET 10 and opts into Microsoft.Testing.Platform through global.json; tests use xUnit v3.

Required test workflow

  1. Build before running tests:

    dotnet build KubeUI.slnx --tl:off -clp:ErrorsOnly
  2. Run the narrowest relevant test scope first, then widen to the project or solution when the focused run passes.
  3. Treat a run that executes zero tests as invalid validation. Use --minimum-expected-tests 1 for focused runs and verify the output reports a nonzero count.
  4. For a bug, add the failing regression first, confirm it fails, implement the fix, and rerun the same regression before broader validation.

CLI examples

The examples use KubeUI.Avalonia.Tests as “project A”, KubeUI.Avalonia.Tests.Converters.PropertyItemValueConverterTests as “class A”, and converts_utc_datetime_to_local_time as “test A”. Replace them with the real project, fully qualified class, and method names for the change.

Test project A

dotnet test --project tests/KubeUI.Avalonia.Tests/KubeUI.Avalonia.Tests.csproj --no-restore --minimum-expected-tests 1

Test all projects

dotnet test --no-restore --minimum-expected-tests 1

Test project A, class A

Use the project target with a fully qualified class filter:

dotnet test --project tests/KubeUI.Avalonia.Tests/KubeUI.Avalonia.Tests.csproj --no-restore --filter-class KubeUI.Avalonia.Tests.Converters.PropertyItemValueConverterTests --minimum-expected-tests 1

Test project A, test A

List tests from the project when the exact generated name is uncertain:

dotnet test --project tests/KubeUI.Avalonia.Tests/KubeUI.Avalonia.Tests.csproj --no-restore --list-tests

Use a fully qualified method filter:

dotnet test --project tests/KubeUI.Avalonia.Tests/KubeUI.Avalonia.Tests.csproj --no-restore --filter-method KubeUI.Avalonia.Tests.Converters.PropertyItemValueConverterTests.converts_utc_datetime_to_local_time --minimum-expected-tests 1

Use the fully qualified class or method name returned by --list-tests when selecting another target.

Coverage and hang detection

Coverage collection and hang detection are enabled by the repository’s testconfig.json, which is automatically added to test projects by Directory.Build.props.

  • Coverage is collected in Cobertura format under TestResults.
  • Hang dumps are enabled with a one-minute timeout. Crash dumps and TRX reports are enabled too.

Inspect the generated *.cobertura.xml for line and branch rates. Collection being enabled does not by itself enforce a threshold.

Every new feature must include behavior-focused tests that cover at least 90% of the affected code and contribute to keeping the codebase at or above 90% coverage. Do not inflate the number with implementation-only assertions; cover meaningful branches, failure paths, and user-visible behavior. Report any uncovered code and the measured line/branch percentages.

KubeUI test rules

  • Use [AvaloniaFact] only for tests that require Avalonia; use [Fact] or [Theory] for pure model, serialization, transport, and service tests.
  • Do not use Task.Delay or Thread.Sleep. Wait on an observable state, event, informer completion, or another bounded predicate.
  • Pass TestContext.Current.CancellationToken through cancellable async operations and bound every wait.
  • Use the production Kubernetes client with the shared fake transport for deterministic local tests. Use the shared fake/Kind matrix for backend parity; Kind cases require KUBEUI_RUN_KIND_TESTS=1.
  • Dispose test-owned scopes, workspaces, and view models in the test that creates them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.