why the /step option doesn't work as described?

Jan 31, 2009 at 8:01 PM
In the NModel manual, it says that

[/steps:<int>]*
The desired number of steps that a single test run should have. After the number
is reached, only cleanup tester actions are used and the test run continues until an
accepting state is reached or the number of steps is MaxSteps (whichever occurs
rst).

However, when I specify /steps:20, then ct yields a failure after 20 actions, if the state after the last action is a non-accepting state. Any solutions?

Regards,
Pritha
Developer
Feb 1, 2009 at 4:19 PM
Hi!

/steps should be paired with /maxSteps that specifies the maximum number of steps a test run can have. You can just set /maxSteps to be a reasonable number larger than /steps. Otherwise /steps sets /maxSteps to have the same value.

Regards,

jpe
Feb 1, 2009 at 11:51 PM
Hi,

I tried that, still it considers /steps option same as /maxSteps. For example, the following arguments yield a failure status after executing 30 actions, where /maxSteps was specified as 60 and /steps was specified as 30.

# references
/r:..\Model\CruiseController.dll /r:..\Impl\Stepper.dll
#/modelStepper:NModel.Conformance.StrategyWithCoverage.CreateWithProbableRewa

rd
/r:CustomStrategyWithCoverage.dll
# factory method of the model
CruiseController.Factory.Create
# factory method of the strategy
/modelStepper:NModel.Conformance.CustomStrategyWithCoverage.CreateStrategy
# factory method of the stepper
/iut:CruiseControllerImpl.Stepper.Create
# number of steps and runs
/runs:1 /maxSteps:60 /steps:30

Regards,
Pritha
Developer
Feb 2, 2009 at 8:59 AM
Hi!

You should also specify cleanup actions: /cleanupAction:<string> or /c for short. These are the actions that are allowed in the cleanup phase.

Regards,

jpe