finish method
Called by the runner when the step ends, with the error if the step has failed
Implementation
void finish(StepError? error) {
_stopwatch.stop();
this.error = error;
statusText = null;
status = error == null ? StepStatus.succeeded : StepStatus.failed;
}