Class CheckpointCounter
Each call to increment(CheckpointType, String, CheckpointStatus) stores one checkpoint
entry and updates pass/fail counters. Call attach() once at the end of execution to
publish the generated report attachment.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidattach()Attaches the accumulated checkpoint summary HTML report to the current report context.static voidincrement(CheckpointType type, String message, CheckpointStatus status) Creates a new checkpoint entry and updates the pass/fail counters.static voidTesting-support hook only — not for production use.
-
Constructor Details
-
CheckpointCounter
public CheckpointCounter()Creates a new checkpoint counter instance.
-
-
Method Details
-
increment
Creates a new checkpoint entry and updates the pass/fail counters. The entry is stamped with a stable, process-wide id and the current test's identity (class/method), so it can be attributed and deep-linked to its owning test even though the checkpoint list is cumulative.- Parameters:
type- the checkpoint type (assertion or verification)message- the checkpoint messagestatus- the final status of the checkpoint
-
resetForTesting
public static void resetForTesting()Testing-support hook only — not for production use. Resets the process-wide, static checkpoint accumulation back to its initial empty/zero state: it clears thecheckpointslist, zeroes thepassedCheckpoints/failedCheckpointscounters, and resets the monotoniccheckpointSequenceid source so the next captured checkpoint restarts at id1.Because this static state is shared by every test in the same forked JVM (any SHAFT Validation/Verification records a checkpoint via
ValidationsHelper), tests that must isolate themselves from checkpoints left behind by earlier-run tests call this between methods. It exists as a single,publicentry point so those tests no longer each reflect into these private fields to clear them (issue #3846); it ispublicrather than package-private because consumer tests live outside this package. -
attach
public static void attach()Attaches the accumulated checkpoint summary HTML report to the current report context.If no checkpoints were recorded, this method does nothing.
-