ScenarioRunReport class

A written run, read back.

var report = await ScenarioRunReport.read('build/flutterware/screenshots');
for (var package in report.run.packages) {
  for (var scenario in package.scenarios) {
    if (scenario.ok) continue;
    var step = scenario.steps.last;
    await service.upload(report.file(step.image), scenario.name);
  }
}

Constructors

ScenarioRunReport({required String directory, String root = '.', required ScenarioRunResult run})
const

Properties

directory → String
Where run.json was found.
final
hashCode → int
The hash code for this object.
no setterinherited
root → String
What a step's artifact paths resolve against — the worktree the run executed in, not directory. They are recorded worktree-relative so the report survives being read on another machine; a reader elsewhere passes its own checkout here. Not serialized, for the same reason.
final
run → ScenarioRunResult
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

events(ScenarioRunStep step) → List<AppEvent>
The transition's events for step, typed — empty for a quiet transition, which is most of them.
file(String path) → File
Turns a step's artifact path — ScenarioRunStep.image, its tree, its events — into a file. Worktree-relative paths resolve against root; a run sent outside the worktree with --output records absolute paths, which pass through.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

read(String directory, {String root = '.'}) → Future<ScenarioRunReport>
Reads the run.json in directory.