Package nz.ac.waikato.modeljunit

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


        metric.clear();
        tester.reset();
        tester.setRandom(new Random(seed));
        int count = 0;
        while (metric.getPercentage() < 100.0) {
          tester.generate(1);
          if (fsm.time > lastTime) {
            lastTime = fsm.time;
          } else {
            testSeqTime += lastTime;
            //System.out.println("added " + lastTime + " secs");
View Full Code Here


        int[] stages = computeStages(WALK_LENGTH);
        for (int i = 0; i < stages.length; i++) {
            randomTester.generate(stages[i]);
            greedyTester.generate(stages[i]);
            lookaheadTester.generate(stages[i]);
            quickTester.generate(stages[i]);

            //System.out.println("DEBUG: Progress: " + stages[i] + "/" + WALK_LENGTH);
            setProgress(stages[i], WALK_LENGTH);
            // Update the line chart and repaint
            mRandomTesterCoverage.add((int) coverage[0].getCoverage());
View Full Code Here

            tester.addCoverageMetric(coverage[2]);
            tester.addCoverageMetric(coverage[3]);

            // Run test several times to draw line chart
            for (int i = 0; i < stages.length; i++) {
                tester.generate(stages[0]);
                //System.out.println("DEBUG: Progress: " + stages[i] + "/" + mProject.getWalkLength());
                mCoverage.setProgress(stages[i], mProject.getWalkLength());
                // Update the line chart and repaint
                mCoverage.addStateCoverage((int) coverage[0].getPercentage());
                mCoverage.addTransitionCoverage((int) coverage[1].getPercentage());
View Full Code Here

    // 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 "
        + trCoverage.toString());
  }
}
View Full Code Here

    // 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 "
        + trCoverage.toString());
  }
}
View Full Code Here

  /** An example of generating tests from this model. */
  public static void main(String[] args)
  {
    Tester tester = new GreedyTester(new SimpleSet());
    tester.addListener(new VerboseListener());
    tester.generate(100);
  }
}
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.