Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Atemschutz: Rückzugsalarm and timer survivors in ScbaViewModel (63% mutation score)

Chiusa
#719 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #723 di @DeepDiver1975 — integrata

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
testing-qa

Direzione di ricerca

Start with ViewModels/ScbaViewModel.cs and the mutation report from make mutate PROJECT=AppLogic; then read the related tests and tests/LageBuch.AppLogic.Tests/stryker-config.json. Add focused tests for the listed alarm, timer, row refresh, and input survivors, using a fixed clock where needed. Done means the tests catch the specified mutants and the AppLogic mutation score floor is raised; pull request #723 is already open against this issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The weekly mutation run (2026-10-21, run 39560645989) scores ViewModels/ScbaViewModel.cs at 63 %: 115 mutants are undetected, 29 of them with no test reaching the code at all. Of the AppLogic files, only CoMessprotokollViewModel and IncidentWorkspaceViewModel leave more undetected. This one is the Atemschutz monitor, so a wrong timer or a silent alarm here is a safety problem, not a cosmetic one.

These survivors would be real bugs that the tests let through (line numbers as of 058273e):

Rückzugsalarm
  • The alarm reason (line 691): AlarmReason always returning "Einsatzzeit erreicht" survives. A Trupp at Rückzugsdruck would show the wrong reason on the banner.
  • The repeat cadence (line 706): >= RetreatRepeatInterval → > survives. No test checks that the cue repeats exactly when the interval has passed.
  • After every alarm has cleared (lines 711–719): turning else if (!IsAnyAlarm) around, leaving IsAlarmAcknowledged set, or dropping the IsAnyAlarm/AlarmDisplay notifications all survive. The banner could keep showing a cleared alarm.
  • Reopening an incident (lines 373–375): the loop that keeps a Trupp which is already alarming from being written into the ETB a second time has no coverage at all.
Timer displays
  • "überzogen" (line 116): no test reaches a Trupp past its Einsatzzeit in RemainingDisplay.
  • "fällig" (line 130): every mutant of the <= TimeSpan.Zero boundary in ControlRemainingDisplay survives.
  • Row refresh (lines 265–291): every OnPropertyChanged and NotifyCanExecuteChanged in Refresh() and the Sicherheitstrupp update can be removed unnoticed. On screen, a row's timer, status or buttons would stop updating.
Input
  • Truppnummer 0 (line 802): NewTruppNumber > 0 → >= 0 survives. No test rejects a Truppnummer of 0.
Reproduce
make mutate PROJECT=AppLogic
# report: StrykerOutput/AppLogic/reports/mutation-report.html, file ViewModels/ScbaViewModel.cs

The weekly run's mutation-report-AppLogic artifact has the same report.

Suggested approach

Use a FakeTimeProvider/fixed IClock and drive the view model through the alarm life cycle:

  • trip the alarm;
  • acknowledge it;
  • let the repeat interval pass, exactly at the boundary;
  • clear the alarm;
  • trip it again;
  • reopen the incident with a Trupp already alarming.

Assert on AlarmDisplay, the played cues, the ETB entries, and the PropertyChanged events a row raises on a tick. Each test should fail against its mutant first. Skip the survivors that only change German UI text formatting.

Fixing these raises AppLogic's score. Raise its floor in tests/LageBuch.AppLogic.Tests/stryker-config.json in the same pull request.

Lingua principale
C#
Stelle
1
Fork
3
Merge medio
4h 15m
PR unite (30g)
181

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodeForFire/lagebuch

Tutte le issue di CodeForFire/lagebuch

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.