ix.iplan
Class AutoTester.TestRunner

java.lang.Object
  extended by ix.iplan.AutoTester.TestRunner
Direct Known Subclasses:
BlockStackingTest.BlockTestRunner, MissionaryTest.MissionaryTestRunner, TrainsTest.TrainsTestRunner
Enclosing class:
AutoTester

public class AutoTester.TestRunner
extends java.lang.Object

Conducts a plan-test.

See Also:
PlanTest.makeTestRunner(AutoTester)

Field Summary
protected  java.util.Map changedState
           
protected  int planNumber
           
protected  int remainingReplans
           
protected  PlanTest test
           
 
Constructor Summary
AutoTester.TestRunner(PlanTest test)
          Constructs a test-runner for the indicated test.
 
Method Summary
protected  void checkPlan(Slip slip)
          Checks the plan.
protected  void comparePlanModels(Ip2ModelManager original, Ip2ModelManager copy)
           
protected  void describePlan(Slip slip)
           
protected  void describeTest()
           
protected  Plan initialPlan()
           
protected  PlanCheckingSimulator makePlanCheckingSimulator(Slip slip)
           
protected  void planFromPlan(Slip slip)
           
protected  Domain readDomain()
           
protected  java.util.Map runSimulation(PlanCheckingSimulator sim)
          Simulates one execution of the plan.
 void runTest()
          The entry point for running a test.
protected  void saveChangedState(java.util.Map m)
           
protected  java.lang.String savedChangedStateName()
           
protected  java.lang.String savedPlanName()
           
protected  void savePlan(Slip slip)
           
protected  void savePlanFromPlan(Plan plan)
           
protected  Plan taskPlan()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

test

protected PlanTest test

planNumber

protected int planNumber

remainingReplans

protected int remainingReplans

changedState

protected java.util.Map changedState
Constructor Detail

AutoTester.TestRunner

public AutoTester.TestRunner(PlanTest test)
Constructs a test-runner for the indicated test. Note that tests normally create their own TestRunner via their PlanTest.makeTestRunner(AutoTester) method. That allows them to use a specialised subclass.

Method Detail

runTest

public void runTest()
The entry point for running a test. This method directly or indirectly calls the other methods in the class.


describeTest

protected void describeTest()

describePlan

protected void describePlan(Slip slip)

savePlan

protected void savePlan(Slip slip)

savedPlanName

protected java.lang.String savedPlanName()

saveChangedState

protected void saveChangedState(java.util.Map m)

savedChangedStateName

protected java.lang.String savedChangedStateName()

readDomain

protected Domain readDomain()

initialPlan

protected Plan initialPlan()

taskPlan

protected Plan taskPlan()

checkPlan

protected void checkPlan(Slip slip)
Checks the plan. This includes running one simulation using node-ends in their default order, plus the number of simulations specified by the test that randomly shuffle the order (to the extent allowed by the plan's ordering constraints). Each simulation is run by calling runSimulation(PlanCheckingSimulator).


makePlanCheckingSimulator

protected PlanCheckingSimulator makePlanCheckingSimulator(Slip slip)

comparePlanModels

protected void comparePlanModels(Ip2ModelManager original,
                                 Ip2ModelManager copy)

runSimulation

protected java.util.Map runSimulation(PlanCheckingSimulator sim)
Simulates one execution of the plan.


planFromPlan

protected void planFromPlan(Slip slip)

savePlanFromPlan

protected void savePlanFromPlan(Plan plan)