Esempio n. 1
0
  public static void main(String[] args) {
    OSMOTester tester = new OSMOTester();
    tester.addModelObject(new VendingMachine());
    tester.generate(29);

    // Print coverage metric
    TestSuite suite = tester.getSuite();
    CSVCoverageReporter csv =
        new CSVCoverageReporter(suite.getCoverage(), suite.getAllTestCases(), tester.getFsm());
    System.out.println("\n" + csv.getStepCounts());
    System.out.println("\n" + suite.getCoverage().getStates());
    System.out.println("\n" + suite.getCoverage().getStatePairs());
  }
Esempio n. 2
0
 public static void main(String[] args) {
   OSMOTester osmo = new OSMOTester();
   osmo.addModelObject(new HelloModel());
   Scenario scenario = new Scenario(false);
   scenario.addStartup("hello", "world", "hello");
   osmo.getConfig().setScenario(scenario);
   osmo.setTestEndCondition(new Length(5));
   osmo.setSuiteEndCondition(new Length(2));
   osmo.generate(55);
 }