Skip to main content

run-tests

**EXECUTION (runbook) SKILL** — Build and run the Git Extensions test suite and interpret results. USE FOR: running tests, running a single test/project, diagnosing a failing or flaky test. DO NOT USE FOR: writing new features (write tests as part of that), or CI config changes. Triggers: "run the tests", "run this test", "why is this test failing", "dotnet test".

Quellinformationen

Repository
gitextensions/gitextensions
Letzte Quellaktivität
14. Juli 2026 um 08:04
Erkannte Sprache von SKILL.md
Englisch
Sterne
8.594
Forks
2.221

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
run-tests
description
**EXECUTION (runbook) SKILL** — Build and run the Git Extensions test suite and interpret results. USE FOR: running tests, running a single test/project, diagnosing a failing or flaky test. DO NOT USE FOR: writing new features (write tests as part of that), or CI config changes. Triggers: "run the tests", "run this test", "why is this test failing", "dotnet test".
# Run Tests (runbook) ## Steps 1. **Build first:** `dotnet build /v:q` (tests won't be meaningful over a broken build). 2. **Run the suite:** `dotnet test` (the default VS Code "test" task). Or scope it: ``` dotnet test .\tests\app\UnitTests\<Project>\<Project>.csproj ``` 3. **Read failures:** note the test name (its snake_case suffix describes the expected behavior) and the AwesomeAssertions message. ## Conventions (see [testing-guide](../../copilot-docs/L2-core-platform/testing-guide.md)) - **NUnit** + **NSubstitute** (mocks) + **AwesomeAssertions** (never `ClassicAssert`, never Moq). - Test names keep the method name and add a snake_case suffix (`MyMethod_should_do_x`). - Substitute `IExecutable`/`IProcess` so tests don't spawn real `git`. - `Verify.NUnit` snapshots use `.verified.*` files — review diffs when they change. - Reach private members via a class's `TestAccessor`. ## Diagnosing a failure - Reproduce the single test in isolation before changing code. - Check whether a `Verify` snapshot legitimately changed (update it) vs a real regression. ## STOP conditions / hard rules - A **flaky** test → find and fix the **root cause**; do not dismiss it as pre-existing or retry blindly. - Do not weaken assertions or add `[Ignore]` to make a suite green — fix the underlying issue. - Never use `[DataTestMethod]` (that's MSTest); this repo uses NUnit `[TestCase]`/`[TestCaseSource]`.
Auf GitHub ansehen