Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ
#719 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #723 @DeepDiver1975 による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
csharp
領域
testing-qa

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C#
スター
1
フォーク
3
平均マージ
4時間 15分
マージ済み PR(30日)
181

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CodeForFire/lagebuch のほかの issue

CodeForFire/lagebuch の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。