Beispiel #1
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);
 }
 /**
  * This is used when not calling from main explorer (local) algorithm.
  *
  * @param config Exploration properties.
  * @param suiteCoverage Used for calculating if end is near or not.
  * @param exploring Set to true if this instance is to be used for exploration mode.
  */
 public ExplorationEndCondition(
     ExplorationConfiguration config, TestCoverage suiteCoverage, boolean exploring) {
   this.config = config;
   this.scoreCalculator = new ScoreCalculator(config);
   this.fallbackProbability = config.getFallbackProbability();
   this.startTime = System.currentTimeMillis();
   this.suiteCoverage = suiteCoverage;
   this.exploring = exploring;
   Scenario scenario = config.getScenario();
   if (scenario != null) {
     this.scenarioEndCondition = scenario.createEndCondition(null);
   } else {
     this.scenarioEndCondition = null;
   }
 }