public void addExecutionResult(RootNode rootNode) { addFailuresToLists(rootNode, Collections.emptyList()); // possible that the failure is only in the root node... if (rootNode.getResult().getFailure() != null && rootNode.getResult().getResult().isFailure() && nonCriticalFailures.isEmpty() && criticalFailures.isEmpty()) { SubstepExecutionFailure failure = rootNode.getResult().getFailure(); if (failure.isNonCritical()) { nonCriticalFailures.add(Lists.newArrayList((IExecutionNode) rootNode)); } else { criticalFailures.add(Lists.newArrayList((IExecutionNode) rootNode)); } } }
public byte[] prepareExecutionConfigAsBytes(final SubstepsExecutionConfig theConfig){ RootNode rtn = null; try { rtn = prepareExecutionConfig(theConfig); log.debug("execution config prepared"); } // catch (SubstepsConfigurationException e){ // // } catch(Exception e){ log.error("Error preparing ExecutionConfig", e); List<FeatureNode> empty = Collections.emptyList(); rtn = new RootNode("Substeps Test", empty); ExecutionNodeResult result = rtn.getResult(); result.setThrown(e); result.setResult(ExecutionResult.PARSE_FAILURE); } return getBytes(rtn); }
private byte[] prepareExecutionConfigAsBytes(final Config theConfig) { RootNode rtn; try { rtn = prepareExecutionConfig(theConfig); log.debug("execution config prepared"); } catch (Exception e) { log.error("Error preparing ExecutionConfig", e); List<FeatureNode> empty = Collections.emptyList(); String env = System.getProperty("environment", "localhost"); rtn = new RootNode("Substeps Test", empty, env, NewSubstepsExecutionConfig.getTags(theConfig), NewSubstepsExecutionConfig.getNonFatalTags(theConfig)); ExecutionNodeResult result = rtn.getResult(); result.setThrown(e); result.setResult(ExecutionResult.PARSE_FAILURE); } return getBytes(rtn); }