code: public static StepEndState calculateStepMacroEndState(List<StepToken> executedSteps) {
          StepEndState stepMacroEndState = StepEndState.PASSED;
          for ( StepToken s : executedSteps) {
              if ( s.getEndState() != StepEndState.PASSED) {
                  stepMacroEndState = s.getEndState();
                  break;
              }
          }
          return stepMacroEndState;
      }
docs: The end state of a step macro step is derived from the child steps
  If all child steps are PASSED then the step macro will be PASSED,
  otherwise the step macro end state is taken from the first child step which was not PASSED