Package nz.ac.waikato.modeljunit.coverage

Examples of nz.ac.waikato.modeljunit.coverage.CoverageHistory


  /** 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();
    System.out.println("Transition Coverage ="+hist.toString());
    System.out.println("History = "+hist.toCSV());
  }
View Full Code Here


        redrawGraph();
    }

    public void runClass(Project project) {
        CoverageHistory[] coverage = new CoverageHistory[4];
        coverage[0] = new CoverageHistory(new TransitionCoverage(), 1);
        coverage[1] = new CoverageHistory(new TransitionCoverage(), 1);
        coverage[2] = new CoverageHistory(new TransitionCoverage(), 1);
        coverage[3] = new CoverageHistory(new TransitionCoverage(), 1);

        Tester randomTester = constructRandomTester(project, coverage[0]);
        Tester greedyTester = constructGreedyTester(project, coverage[1]);
        Tester lookaheadTester = constructLookaheadTester(project, coverage[2]);
        Tester quickTester = constructQuickTester(project, coverage[3]);
View Full Code Here

            // Leave the coverage window hidden until manually opened from the View menu
            // displayCoverageWindow();
            buildGraphGUI();

            CoverageHistory[] coverage = new CoverageHistory[TestExeModel.COVERAGE_NUM];
            coverage[0] = new CoverageHistory(new StateCoverage(), 1);
            coverage[1] = new CoverageHistory(new TransitionCoverage(), 1);
            coverage[2] = new CoverageHistory(new TransitionPairCoverage(), 1);
            coverage[3] = new CoverageHistory(new ActionCoverage(), 1);
            tester.addCoverageMetric(coverage[0]);
            tester.addCoverageMetric(coverage[1]);
            tester.addCoverageMetric(coverage[2]);
            tester.addCoverageMetric(coverage[3]);
View Full Code Here

TOP

Related Classes of nz.ac.waikato.modeljunit.coverage.CoverageHistory

Copyright © 2018 www.massapicom. 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.