Hi Mauro, I've found the problem...

I tried to use same method for two sentences, fist one for the "when" and the second one for the "And" (Is not nice to repeaty the subject all the time). When the alias is matched jbehave throws a exception because there is no actor for match the method argument.

@When("$actor fills the field $field with $data")
@Alias("fills the field $field with $value")
public void whenActorFillsField(@Named("actor") String pActor,
           @Named("field ") String pField, @Named("value") String pValue)

I will create two methods as a workaroud...

thanks and regards

Cristiano

Mauro Talevi escreveu:
Hi Cristiano,

the first step to understanding where what's going on is to enable the step monitoring. By default, the silent step monitor is used. Change the StepConfiguration to use the PrintStreamStepMonitor.

If you can't get any joy, feel free to send a sample of your steps.

Cheers


Cristiano Gavião wrote:
Hi Mauro,

I'm getting this error running my scenario.

I know that is something about any wrong arguments, but I can't localize what steps it is.

Do you have any tip for discover the place where this happen?

thanks

Cristiano

java.lang.IndexOutOfBoundsException: No group 1
   at java.util.regex.Matcher.group(Matcher.java:470)
at org.jbehave.scenario.steps.CandidateStep.argForPosition(CandidateStep.java:127) at org.jbehave.scenario.steps.CandidateStep.argsForStep(CandidateStep.java:98) at org.jbehave.scenario.steps.CandidateStep.createFrom(CandidateStep.java:84) at org.jbehave.scenario.steps.UnmatchedToPendingStepCreator.addAllNormalSteps(UnmatchedToPendingStepCreator.java:43) at org.jbehave.scenario.steps.UnmatchedToPendingStepCreator.createStepsFrom(UnmatchedToPendingStepCreator.java:19) at org.jbehave.scenario.ScenarioRunner.runScenario(ScenarioRunner.java:103)
   at org.jbehave.scenario.ScenarioRunner.run(ScenarioRunner.java:65)
   at org.jbehave.scenario.ScenarioRunner.run(ScenarioRunner.java:48)
   at org.jbehave.scenario.ScenarioRunner.run(ScenarioRunner.java:38)
at org.jbehave.scenario.AbstractScenario.runScenario(AbstractScenario.java:70) at org.jbehave.scenario.JUnitScenario.runScenario(JUnitScenario.java:51) at org.jbehave.scenario.JUnitScenario.testScenario(JUnitScenario.java:73)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at junit.framework.TestCase.runTest(TestCase.java:168)
   at junit.framework.TestCase.runBare(TestCase.java:134)
   at junit.framework.TestResult$1.protect(TestResult.java:110)
   at junit.framework.TestResult.runProtected(TestResult.java:128)
   at junit.framework.TestResult.run(TestResult.java:113)
   at junit.framework.TestCase.run(TestCase.java:124)
   at junit.framework.TestSuite.runTest(TestSuite.java:232)
   at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to