Thanks for the quick response... unfortunately, i'm still getting the
problem. I probably should have posted the stack trace:
java.lang.NullPointerException
at org.jbehave.scenario.reporters.PassSilentlyDecorator.examplesTable
(PassSilentlyDecorator.java:118)
at org.jbehave.scenario.ScenarioRunner.runExamplesTableScenario
(ScenarioRunner.java:84)
at org.jbehave.scenario.ScenarioRunner.run(ScenarioRunner.java:55)
at org.jbehave.scenario.AbstractScenario.runScenario
(AbstractScenario.java:78)
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:81)
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)
Did my example work for you? (with the modifications?)
On Oct 5, 2009, at 12:26 PM, Mauro Talevi wrote:
Hi Nayan,
with table parameters, the step patterns need to match exactly your
step template. In your case, if the textual step is
Given a stock of symbol [symbol] and a threshold of [threshold]
then the pattern is
@Given("a stock of symbol [symbol] and a threshold of [threshold]")
and similarly for the other steps. It's the @Named parameters that
come into play and are used to fetch the data from the table.
Have a look at the example, in particular the methods named
*WithTableParams():
https://svn.codehaus.org/jbehave/trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/TraderSteps.java
I'll update the page
http://jbehave.org/reference/latest/table-examples.html
to make this clearer.
Cheers
Nayan Hajratwala wrote:
Folks,
I'm having trouble getting a simple table example working. I'm
using jbehave-2.3-rc2
Attached are the files... i'm sure it's something simple and
obvious :-/
------------------------------------------------------------------------
Any ideas?
Thanks!
---
Nayan Hajratwala
http://agileshrugged.com
http://twitter.com/nhajratw
734.658.6032
---------------------------------------------------------------------
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