Package nz.ac.waikato.modeljunit

Examples of nz.ac.waikato.modeljunit.RandomTester


   *  We also report the transition coverage of the model.
   */
  public static void main(String args[])
  {
    // 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);

    // 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


   *  We also report the transition coverage of the model.
   */
  public static void main(String args[])
  {
    // 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);

    // 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

TOP

Related Classes of nz.ac.waikato.modeljunit.RandomTester

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.