Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

## What it is for

Mutation testing for the **two JustDummies packages** — `JustDummies` and its
xUnit v3 adapter `JustDummies.Xunit` ([ADR-0039](../adr/0039-adapt-dummies-to-xunit-v3-through-a-companion-package.md)).
Mutation testing for the **three JustDummies components** — `JustDummies`, its
xUnit v3 adapter `JustDummies.Xunit` ([ADR-0039](../adr/0039-adapt-dummies-to-xunit-v3-through-a-companion-package.md)),
and the analyzers that ship inside the package ([ADR-0044](../adr/0044-ship-justdummies-analyzers.md)).
On a pull request it mutates only the files the pull request changed and fails
when the score falls under the library's threshold; a weekly sweep measures
everything else. What mutation testing *is*, and why this repository gates on
Expand Down Expand Up @@ -43,9 +44,10 @@ what two libraries at different levels of test maturity need anyway.
Identically to [`mutation`](mutation.en.md), whose page documents the mechanism
in full: `changed` mutates the diff from the fork point, `gate` collapses the
matrix into one stable check name, `full` sweeps everything with the threshold
disabled. The per-library Stryker configurations are
[`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json)
and [`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json).
disabled. The per-component Stryker configurations are
[`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json),
[`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json)
and [`build/stryker/justdummies-analyzers.json`](../../../../build/stryker/justdummies-analyzers.json).

Two points from that page matter more here than anywhere else:

Expand Down Expand Up @@ -78,6 +80,11 @@ libraries' bars were set.
`JustDummies.Xunit` needs no such caveat: it is small enough that its bar came
from a full sweep like the rest, and it gates normally.

The analyzers leg also ships with `break` at **0**, for a different reason: its
residual survivors are the analyzer-infrastructure and descriptor-string mutants
the FirstClassErrors analyzers carry too, so it reports rather than blocks
([ADR-0044](../adr/0044-ship-justdummies-analyzers.md)).

## Permissions & security

`contents: read` only. The workflow checks out, builds and runs tests; it stores
Expand All @@ -88,14 +95,15 @@ no secret and needs no write scope.
Take, unchanged:

- this workflow file, renamed to `mutation.yml` there (and its `name:` with it);
- [`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json)
and [`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json);
- [`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json),
[`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json)
and [`build/stryker/justdummies-analyzers.json`](../../../../build/stryker/justdummies-analyzers.json);
- [`.config/dotnet-tools.json`](../../../../.config/dotnet-tools.json) — the
Stryker pin;
- this page, plus the shared sections of [`mutation`](mutation.en.md) folded into
it, since the page it defers to will not exist over there.

Then change exactly one thing: the **`solution`** field in the two
Then change exactly one thing: the **`solution`** field in the three
configurations, which still names `FirstClassErrors.sln`. The `project` and
`test-projects` paths are already repository-relative and unchanged by the move.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

## À quoi il sert

Les tests de mutation des **deux packages JustDummies** : `JustDummies` et son
Les tests de mutation des **trois composants JustDummies** : `JustDummies`, son
adaptateur xUnit v3 `JustDummies.Xunit`
([ADR-0039](../adr/0039-adapt-dummies-to-xunit-v3-through-a-companion-package.fr.md)).
([ADR-0039](../adr/0039-adapt-dummies-to-xunit-v3-through-a-companion-package.fr.md)),
et les analyseurs livrés dans le package
([ADR-0044](../adr/0044-ship-justdummies-analyzers.fr.md)).
Sur une pull request, il ne mute que les fichiers modifiés par celle-ci et échoue
si le score passe sous le seuil de la bibliothèque ; un balayage hebdomadaire
mesure tout le reste. Ce que *sont* les tests de mutation, et pourquoi ce dépôt
Expand Down Expand Up @@ -51,8 +53,9 @@ toute façon besoin.
mécanisme en entier : `changed` mute le diff depuis le point de fourche, `gate`
regroupe la matrice sous un nom de check stable, `full` balaie tout avec le seuil
désactivé. Les configurations Stryker sont
[`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json) et
[`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json).
[`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json),
[`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json)
et [`build/stryker/justdummies-analyzers.json`](../../../../build/stryker/justdummies-analyzers.json).

Deux points de cette page comptent ici plus qu'ailleurs :

Expand Down Expand Up @@ -89,6 +92,12 @@ bibliothèques l'ont été.
`JustDummies.Xunit` n'appelle pas cette réserve : elle est assez petite pour que
sa barre vienne d'un balayage complet comme les autres, et elle barre normalement.

La branche des analyseurs part elle aussi avec `break` à **0**, pour une autre
raison : ses survivants résiduels sont les mutants d'infrastructure d'analyseur et
de chaînes de descripteurs que portent aussi les analyseurs FirstClassErrors —
elle rapporte donc au lieu de bloquer
([ADR-0044](../adr/0044-ship-justdummies-analyzers.fr.md)).

## Permissions & sécurité

`contents: read` seulement. Le workflow fait un checkout, un build et lance des
Expand All @@ -99,14 +108,15 @@ tests ; il ne stocke aucun secret et n'a besoin d'aucun périmètre en écriture
À emporter tel quel :

- ce fichier de workflow, renommé `mutation.yml` là-bas (et son `name:` avec) ;
- [`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json)
et [`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json) ;
- [`build/stryker/justdummies.json`](../../../../build/stryker/justdummies.json),
[`build/stryker/justdummies-xunit.json`](../../../../build/stryker/justdummies-xunit.json)
et [`build/stryker/justdummies-analyzers.json`](../../../../build/stryker/justdummies-analyzers.json) ;
- [`.config/dotnet-tools.json`](../../../../.config/dotnet-tools.json) —
l'épinglage de Stryker ;
- cette page, augmentée des sections partagées de [`mutation`](mutation.fr.md)
repliées dedans, puisque la page à laquelle elle renvoie n'existera pas là-bas.

Puis changer exactement une chose : le champ **`solution`** des deux
Puis changer exactement une chose : le champ **`solution`** des trois
configurations, qui nomme encore `FirstClassErrors.sln`. Les chemins `project` et
`test-projects` sont déjà relatifs au dépôt et inchangés par la migration.

Expand Down
15 changes: 8 additions & 7 deletions doc/handwritten/for-maintainers/workflows/mutation.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ a project ought to be: each one was set from that project's measured full-sweep
score at the time the gate was introduced, rounded down, with a little room left
for the odd equivalent mutant.

**Four projects have no bar yet** — the analyzers, the documentation generator,
the command line and `JustDummies`. Their sweeps are too long to have been run
interactively, so no score was ever measured for them, and a bar was **not**
guessed: their `break` is `0`. Their legs still run, still fail on a broken build
or a failing suite, and still list their survivors — they simply do not yet refuse
a pull request over a score. The first weekly sweep is what supplies those four
figures.
**Five projects have no bar yet** — the analyzers, the documentation generator,
the command line, `JustDummies`, and the JustDummies analyzers that shipped with
[ADR-0044](../adr/0044-ship-justdummies-analyzers.md). No full-sweep score was
ever measured for any of them — for most, because the sweep is too long to have
been run interactively — and a bar was **not** guessed: their `break` is `0`.
Their legs still run, still fail on a broken build or a failing suite, and still
list their survivors — they simply do not yet refuse a pull request over a score.
The first weekly sweep is what supplies those five figures.

That makes the gate a **ratchet**, not an aspiration. It says *do not go below
where this library already is* — a bar every library clears on day one, so the
Expand Down
17 changes: 9 additions & 8 deletions doc/handwritten/for-maintainers/workflows/mutation.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ niveau que tel projet devrait atteindre : chacune a été fixée à partir du sc
balayage complet mesuré sur ce projet au moment de l'introduction du barrage,
arrondi vers le bas, avec un peu de marge pour l'éventuel mutant équivalent.

**Quatre projets n'ont pas encore de barre** : les analyseurs, le générateur de
documentation, la ligne de commande et `JustDummies`. Leurs balayages sont trop
longs pour avoir été exécutés interactivement : aucun score n'a donc été mesuré
pour eux, et une barre n'a **pas** été devinée — leur `break` vaut `0`. Leurs
branches tournent quand même, échouent toujours sur un build cassé ou une suite en
échec, et listent toujours leurs survivants ; elles ne refusent simplement pas
encore une pull request sur un score. C'est le premier balayage hebdomadaire qui
fournira ces quatre chiffres.
**Cinq projets n'ont pas encore de barre** : les analyseurs, le générateur de
documentation, la ligne de commande, `JustDummies`, et les analyseurs JustDummies
arrivés avec l'[ADR-0044](../adr/0044-ship-justdummies-analyzers.fr.md). Aucun
score de balayage complet n'a été mesuré pour eux — pour la plupart, parce que le
balayage est trop long pour avoir été exécuté interactivement — et une barre n'a
**pas** été devinée : leur `break` vaut `0`. Leurs branches tournent quand même,
échouent toujours sur un build cassé ou une suite en échec, et listent toujours
leurs survivants ; elles ne refusent simplement pas encore une pull request sur un
score. C'est le premier balayage hebdomadaire qui fournira ces cinq chiffres.

Cela fait du barrage un **cliquet**, pas une aspiration. Il dit *ne descendez pas
sous le niveau où cette bibliothèque est déjà* — une barre que toutes franchissent
Expand Down