logStandaloneScreenshotCaptureFailure function

void logStandaloneScreenshotCaptureFailure({
  1. required EnsembleTestContext context,
  2. required TestStep step,
  3. required int stepIndex,
  4. required Object error,
})

Records a standalone screenshot failure without changing test outcome.

Implementation

void logStandaloneScreenshotCaptureFailure({
  required EnsembleTestContext context,
  required TestStep step,
  required int stepIndex,
  required Object error,
}) {
  RunnerBenchmark.count('screenshotCaptureFailures', 1);
  final failureKind = classifyScreenshotCaptureFailure(error);
  context.logger.log(
    'Screenshot capture skipped for step ${stepIndex + 1} '
    '(${step.type}): ${failureKind.name}: $error',
  );
}