@Override protected boolean execute(RootNode node, RootNodeExecutionContext context) { boolean success = addExpectedChildrenFailureIfNoChildren(node, node.getChildren(), context); for (FeatureNode feature : node.getChildren()) { success &= featureNodeRunner.run(feature, context); } return success; }
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 RootNode buildExecutionNodeTree(String description) { List<FeatureNode> features = Lists.newArrayListWithExpectedSize(parameters.getFeatureFileList().size()); for (final FeatureFile featureFile : parameters.getFeatureFileList()) { FeatureNode featureNode = featureNodeBuilder.build(featureFile); if (featureNode != null) { features.add(featureNode); } } return new RootNode(description, features); }
node.getResult().setFinished(); context.getNotificationDistributor().onNodeFinished(node); List<FeatureNode> featureNodes = node.getChildren(); boolean rootNodeStateSet = false; for (FeatureNode featureNode : node.getChildren()){ node.getResult().setFinished(); context.getNotificationDistributor().onNodeFinished(node);
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); }
public RootNode(String featureSetDescription, List<FeatureNode> features, String environment, String tags, String nonFatalTags) { super(features); this.featureSetDescription = featureSetDescription; this.setDepth(0); this.timestamp = System.currentTimeMillis(); this.environment = environment; this.tags = tags; this.nonFatalTags = nonFatalTags; }
private void runExecutionConfig(final ExecutionConfig theConfig) throws MojoExecutionException { this.runner.prepareExecutionConfig(theConfig.asSubstepsExecutionConfig()); final RootNode rootNode = this.runner.run(); if (theConfig.getDescription() != null) { rootNode.setLine(theConfig.getDescription()); } addToReport(rootNode); this.buildFailureManager.addExecutionResult(rootNode); }
node.getResult().setFinished(); context.getNotificationDistributor().onNodeFinished(node); for (FeatureNode featureNode : node.getChildren()) { node.getResult().setFinished(); context.getNotificationDistributor().onNodeFinished(node);
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); }
@Override protected boolean execute(RootNode node, RootNodeExecutionContext context) { boolean success = addExpectedChildrenFailureIfNoChildren(node, node.getChildren(), context); for (FeatureNode feature : node.getChildren()) { success &= featureNodeRunner.run(feature, context); } return success; }
public RootNode buildExecutionNodeTree(String description) { List<FeatureNode> features = Lists.newArrayListWithExpectedSize(parameters.getFeatureFileList().size()); for (final FeatureFile featureFile : parameters.getFeatureFileList()) { FeatureNode featureNode = featureNodeBuilder.build(featureFile); if (featureNode != null) { features.add(featureNode); } } String env = System.getProperty("environment", "localhost"); return new RootNode(description, features, env, NewSubstepsExecutionConfig.getTags(config), NewSubstepsExecutionConfig.getNonFatalTags(config)); }
@Override public <RETURN_TYPE> List<RETURN_TYPE> accept(ExecutionNodeVisitor<RETURN_TYPE> executionNodeVisitor) { List<RETURN_TYPE> toReturn = Lists.newArrayList(); toReturn.add(executionNodeVisitor.visit(this)); for (FeatureNode feature : getChildren()) { toReturn.addAll(feature.accept(executionNodeVisitor)); } return toReturn; }
private void buildStatsForRootNode(RootNode rootNode) { for (FeatureNode featureNode : rootNode.getChildren()) { buildStatsForFeatureNode(featureNode); for (ScenarioNode<?> scenarioNode : featureNode.getChildren()) { buildStatsForScenarioNode(scenarioNode); } } }
private void buildCallHierarchy() { final ExecutionNodeUsage rootUsage = new ExecutionNodeUsage(this.rootNode); callerHierarchy.put(rootUsage, null); // nothing calls this for (final FeatureNode feature : this.rootNode.getChildren()){ addToCallHierarchy(feature); for (final ScenarioNode scenario : feature.getChildren()){ addToCallHierarchy(scenario); processChildrenForCallHierarchy(scenario.getChildren()); } } }
private void buildCallHierarchy() { final ExecutionNodeUsage rootUsage = new ExecutionNodeUsage(this.rootNode); callerHierarchy.put(rootUsage, null); // nothing calls this for (final FeatureNode feature : this.rootNode.getChildren()) { addToCallHierarchy(feature); for (final ScenarioNode scenario : feature.getChildren()) { addToCallHierarchy(scenario); processChildrenForCallHierarchy(scenario.getChildren()); } } }