Examples of printGraphDot()


Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

    //tester.addListener(new VerboseListener());
    double origProb = model.getTimeoutProbability();
    model.setTimeoutProbability(0.3); // while exploring the FSM
    GraphListener graph = tester.buildGraph();
    model.setTimeoutProbability(origProb);
    graph.printGraphDot("SimpleTimedLight.dot");
    System.out.println("FSM has " + graph.getGraph().numVertices() + " states and "
        + graph.getGraph().numEdges() + " transitions");
    CoverageMetric metric = tester.addCoverageMetric(new TransitionCoverage());
    for (double prob = 0.1; prob < 0.99; prob += 0.1) {
      model.setTimeoutProbability(prob);
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

    System.out.println("------------------------");
    tester.setRandom(new Random());
    tester.generate(100);
    GraphListener listener = tester.buildGraph();
    try {
      listener.printGraphDot("OriginalAlarmClock.dot");
    }
    catch (FileNotFoundException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

  {
    Tester tester = new RandomTester(new ECinema());
    // The guards make this a more difficult graph to explore, but we can
    // increase the default maximum search to complete the exploration.
    GraphListener graph = tester.buildGraph(100000);
    graph.printGraphDot("ecinema.dot");
    CoverageMetric trans = tester.addCoverageMetric(new TransitionCoverage());
    CoverageMetric trpairs = tester.addCoverageMetric(new TransitionPairCoverage());
    CoverageMetric states = tester.addCoverageMetric(new StateCoverage());
    CoverageMetric actions = tester.addCoverageMetric(new ActionCoverage());
    tester.addListener("verbose");
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

        break;
      if (line.equals("graph")) {
        quidonc.out.println("Building FSM graph...");
        Tester tester = new GreedyTester(quidonc);
        GraphListener graph = tester.buildGraph();
        graph.printGraphDot("QuiDonc.dot");
        quidonc.out.println("Printed FSM graph to QuiDonc.dot.");
        quidonc.out.println("Use dotty or dot from http://www.graphviz.org"
            + " to view/transform the graph.");
      }
      else if (line.equals("dial")) {
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

    System.out.println("Exploring the SimCard model without testing the SUT.");
    RandomTester tester = new GreedyTester(new SimCard(null));
    // use very long test sequences (since reset corresponds to a new card).
    tester.setResetProbability(0.0001);
    GraphListener graph = tester.buildGraph(1000000);
    graph.printGraphDot("gsm.dot");
    System.out.println("Graph contains "
        + graph.getGraph().numVertices() + " states and "
        + graph.getGraph().numEdges() + " transitions.");
  }
}
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

    Tester tester = new GreedyTester(new AlarmClock());
    tester.setRandom(new Random());
    tester.generate(100);
    GraphListener listener = tester.buildGraph();
    try {
      listener.printGraphDot("AlarmClock.dot");
    }
    catch (FileNotFoundException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GraphListener.printGraphDot()

  {
    Tester tester = new GreedyTester(new TrafficLightOld());
    tester.addListener("verbose");
    GraphListener graphListener = tester.buildGraph();
    try {
      graphListener.printGraphDot("OriginalTrafficLight.dot");
    }
    catch (Exception ex) {
      System.out.println(ex.getMessage());
    }
  }
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.