Examples of TCGNode


Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

   
    // try each of the given postfixes
    for(TestCaseGeneratorRunnerState oRunnerState : colInitialRunnerStates) {
      m_oTestCaseRunnerState = oRunnerState.copy();
      // determine last state
      TCGNode oStartNode = in_oNode;
      // a transition sequence was found?
      if(!m_oTestCaseRunnerState.getTestGoalsToSatisfy().isEmpty()) {
        TestGoalBase oTestGoal = m_oTestCaseRunnerState.getTestGoalsToSatisfy().get(0);
        if(oTestGoal instanceof TestGoalTransitionSequence) {
          TestGoalTransitionSequence oTestGoalTransitionSequence =
            (TestGoalTransitionSequence)oTestGoal;
          TCGNode oSequenceEndNode = oTestGoalTransitionSequence.getEndNode();
          if(oSequenceEndNode != null) {
            oStartNode = oSequenceEndNode;
          }
        }
      }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

   
    // initial state - try this one if you find no other transitions
    TestCaseGeneratorRunnerState oRunnerState = new TestCaseGeneratorRunnerState();
//    colRunnerStates.add(oRunnerState);

    TCGNode oTargetNode = in_oNode;
    // only one transition is triggered -> prevent ambiguous test goals
    // the same holds if event and condition are null -> no transition could be found!
    if((colTransitions.size() == 1) || (in_oEvent == null && in_oConjunction == null)) {

      if(colTransitions.size() == 1) {
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

  //Amin Rezaee
  @Override
  public TestCase createTestCase(TestCaseGraphHelper in_oTCGHelper)
  {
    TCGNode oNode = (TCGNode)getElement();
    // if composite state: try test generation for each sub state
    if(TCGNodeHelperClass.nodeHasNoSubNodes(oNode)) {
      TestCaseGeneratorRunner oRunner = new TestCaseGeneratorRunner(in_oTCGHelper);
      // initialize the runtime state
      oRunner.searchBackwardsFromNodeWithEventConditionConjunction(
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

  @Override
  public boolean checkSatisfactionOfTestGoalWithAbstractPath(
      LinkedList<Pair<TCGTransition, TCGNode>> in_oPath) {

    TCGNode oNode = (TCGNode)getElement();
   
    setTargetNode(oNode);
    setEventToBeTrigger(null);
    set_DNF(null);
    set_bCreateConditionBasedTestGoal(false);
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

    getTestGoals().add(in_oTestGoal);
    if(in_oTestGoal.getElement() instanceof TCGNode) {
      getTestGoals(in_oTestGoal.getElement()).add(in_oTestGoal);
    }
    else if(in_oTestGoal.getElement() instanceof TCGTransition) {
      TCGNode oNode =
        (TCGNode)((TCGTransition)(in_oTestGoal.getElement())).getSourceNode();
      getTestGoals(oNode).add(in_oTestGoal);
    }
  }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

                 
                  if(subGraph != null) { //node is composite state (1)
                    modelDepth++;
                       for (TestCaseRegion oRegion : subGraph.getRegions()) {
                      for (TCGIntermediateNode oInitNode : TCGRegionHelperClass.findInitialNodes(oRegion)) {
                        TCGNode targetNode = oInitNode.getOutgoingTransitions().get(0).getTargetNode();
                        currentPath.add(new Pair<TCGTransition, TCGNode>(oPair.getFirst(), targetNode));
                        visitedNodeByAlgorithm.add(targetNode);
                        fuelOfAlgorithms--;
                        checkSatisfactionOfTestGoals(currentPath);
                        if(!allTestGoalHasBeenSatisfied()){
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

    // faster approach: compare only the test goals whose base element
    // is the source node of the current transition instance
    for(int i = 0; i < in_oTestCase.getTransitionInstances().size(); ++i) {
      TransitionInstance oTransitionInstance = in_oTestCase.getTransitionInstances().get(i);
//      TCGNode oSourceNode = oTransitionInstance.getSourceNode();
      TCGNode oSourceNode = oTransitionInstance.findLastVisitedNodeContainedOrEqualToCurrentNode();
      checkSatisfactionForNodeAndTransitionInstance(
          oTransitionInstance, oSourceNode, in_oTestCase);
      checkSatisfactionForNodeAndTransitionInstance(
          oTransitionInstance, oTransitionInstance.getTargetNode(), in_oTestCase);
    }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

    if(getSourceNode() != null) {
      TransitionInstance oCurrentTransitionInstance =
        getPrecedingTransitionInstance();
      while(oCurrentTransitionInstance != null) {
        if(oCurrentTransitionInstance.getTransition() != null) {
          TCGNode oLastNode = oCurrentTransitionInstance.getTransition().getTargetNode();
          if(TCGNodeHelperClass.getAllSuperStatesIncludingThis(oLastNode).contains(getSourceNode())) {
            return oLastNode;
          }
        }
        oCurrentTransitionInstance =
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

  public static List<TCGIntermediateNode> findEntryNodes(TestCaseRegion in_oRegion)
  {
    List<TCGIntermediateNode> colRetList = new ArrayList<TCGIntermediateNode>();
    for(TCGNode oNode : in_oRegion.getNodes()) {
      for(TCGTransition oTransition : oNode.getIncomingTransitions()) {
        TCGNode oSourceNode = oTransition.getSourceNode();
        if(oSourceNode instanceof TCGIntermediateNode) {
          TCGIntermediateNode oIntNode = (TCGIntermediateNode)oSourceNode;
          if(oIntNode.getNodeType().equals(TCGNodeType.ENTRY)
              && !oIntNode.getContainer().equals(in_oRegion)) {
            colRetList.add(oIntNode);
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGNode

        in_oLogger.getFormattedOutput().appendln(in_sPrefix + " (test goal #" + in_nTestGoalNumber + " - transition) ");
        in_oLogger.getFormattedOutput().appendln("   from " + oTransitionGoal.getSourceNode().getName());
        in_oLogger.getFormattedOutput().appendln("   to   " + oTransitionGoal.getTargetNode().getName());
      }
      else if(oTestGoalElement.getElement() instanceof TCGNode) {
        TCGNode oNodeGoal = (TCGNode)oTestGoalElement.getElement();
        in_oLogger.getFormattedOutput().appendln(in_sPrefix + " (test goal #" + in_nTestGoalNumber + " - node) ");
        in_oLogger.getFormattedOutput().appendln("   reach state " + oNodeGoal.getName());
      }
    }
    else if(in_oTestGoal instanceof TestGoalGuardConditions) {
      TestGoalGuardConditions oTestGoalGuard = (TestGoalGuardConditions)in_oTestGoal;
      if(oTestGoalGuard.getElement() instanceof TCGNode) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.