Package nz.ac.waikato.modeljunit

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


    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");
    // this illustrates how to generate tests upto a given level of coverage.
    int steps = 0;
    while (actions.getPercentage() < 100 /* || steps < 1000*/) {
      tester.generate();
      steps++;
View Full Code Here


    tester.setRandom(new Random(seed));
    System.out.println(numTests + " tests, with seed = " + seed);
    tester.setResetProbability(0.01);
    //GraphListener graph = tester.buildGraph(0);
    //tester.addListener("Verbose", new VerboseListener(tester.getModel()));
    tester.addListener(new StopOnFailureListener());
    tester.addCoverageMetric(new TransitionCoverage());
    tester.addCoverageMetric(new StateCoverage());
    int test = 0;
    for (; test < numTests; test++) {
      tester.generate(1);
View Full Code Here

    // that we get accurate model coverage metrics.
    tester.buildGraph();

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

    // ask to print the generated tests
    tester.addListener("verbose");

    // generate a small test suite of 20 steps (covers 4/5 transitions)
View Full Code Here

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

    // ask to print the generated tests
    tester.addListener("verbose");

    // generate a small test suite of 20 steps (covers 4/5 transitions)
    tester.generate(20);

    tester.getModel().printMessage(trCoverage.getName() + " was "
View Full Code Here

    // that we get accurate model coverage metrics.
    tester.buildGraph();

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

    // ask to print the generated tests
    tester.addListener("verbose");

    // generate a small test suite of 20 steps (covers 4/5 transitions)
View Full Code Here

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

    // ask to print the generated tests
    tester.addListener("verbose");

    // generate a small test suite of 20 steps (covers 4/5 transitions)
    tester.generate(100);

    tester.getModel().printMessage(trCoverage.getName() + " was "
View Full Code Here

    // that we get accurate model coverage metrics.
    tester.buildGraph();

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

    // ask to print the generated tests
    tester.addListener("verbose");

    // generate a small test suite of 20 steps (covers 4/5 transitions)
View Full Code Here

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

    // ask to print the generated tests
    tester.addListener("verbose");

    // generate a small test suite of 20 steps (covers 4/5 transitions)
    tester.generate(100);

    tester.getModel().printMessage(trCoverage.getName() + " was "
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.