Examples of buildGraph()


Examples of nz.ac.waikato.modeljunit.RandomTester.buildGraph()

  {
    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.RandomTester.buildGraph()

    // create our model and a test generation algorithm
    Tester tester = new RandomTester(new FSM());

    // build the complete FSM graph for our model, just to ensure
    // that we get accurate model coverage metrics.
    tester.buildGraph();

    // set up our favourite coverage metric
    CoverageMetric trCoverage = new TransitionCoverage();
    tester.addListener(trCoverage);
View Full Code Here

Examples of nz.ac.waikato.modeljunit.RandomTester.buildGraph()

    final int experiments = 100;
    SimpleNaiveLight fsm = new SimpleNaiveLight();
    Tester tester = new RandomTester(fsm);
    //tester.addListener(new VerboseListener());
    //tester.addListener(new VerboseListener());
    GraphListener graph = tester.buildGraph();
    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) {
      double totalSteps = 0.0;
View Full Code Here

Examples of nz.ac.waikato.modeljunit.RandomTester.buildGraph()

    // create our model and a test generation algorithm
    Tester tester = new RandomTester(new SpecialFSMNoLoops());

    // build the complete FSM graph for our model, just to ensure
    // that we get accurate model coverage metrics.
    tester.buildGraph();

    // set up our favourite coverage metric
    CoverageMetric trCoverage = new TransitionCoverage();
    tester.addListener(trCoverage);
View Full Code Here

Examples of nz.ac.waikato.modeljunit.RandomTester.buildGraph()

    // create our model and a test generation algorithm
    Tester tester = new RandomTester(new SpecialFSM());

    // build the complete FSM graph for our model, just to ensure
    // that we get accurate model coverage metrics.
    tester.buildGraph();

    // set up our favourite coverage metric
    CoverageMetric trCoverage = new TransitionCoverage();
    tester.addListener(trCoverage);
View Full Code Here

Examples of nz.ac.waikato.modeljunit.Tester.buildGraph()

    TimedModel model = new TimedModel(new SimpleTimedLight());
    Tester tester = new RandomTester(model);
    //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());
View Full Code Here

Examples of nz.ac.waikato.modeljunit.Tester.buildGraph()

  public static void main(String[] args) throws FileNotFoundException
  {
    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());
View Full Code Here

Examples of nz.ac.waikato.modeljunit.Tester.buildGraph()

      if (line == null)
        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.");
      }
View Full Code Here

Examples of nz.ac.waikato.modeljunit.Tester.buildGraph()

  /** An example of generating tests from this model. */
  public static void main(String[] args) throws IOException
  {
    Tester tester = new GreedyTester(new LargeSet(2));
    tester.buildGraph(100000);
    CoverageHistory hist = new CoverageHistory(new TransitionCoverage(), 1);
    tester.addCoverageMetric(hist);
    tester.addListener("verbose");
    while (hist.getPercentage() < 99.0)
      tester.generate();
View Full Code Here

Examples of nz.ac.waikato.modeljunit.Tester.buildGraph()

    // create our model and a test generation algorithm
    Tester tester = new RandomTester(new FSM());

    // build the complete FSM graph for our model, just to ensure
    // that we get accurate model coverage metrics.
    tester.buildGraph();

    // set up our favourite coverage metric
    CoverageMetric trCoverage = new TransitionCoverage();
    tester.addListener(trCoverage);
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.