I think I have no empty example table. My example tables are not empty.

It works as expected without that JUnitReportRunner. Only with
JUnitReportRunner I get a NPE.


2013/10/4 Andreas Ebbert-Karroum <andreas.ebbert-karr...@codecentric.de>

> Hi Hans,
>
> it would have been perfectly sufficient to say if you had an empty
> examples table in your scenario that produced that error.
>
> Thanks,
> Andreas
>
>
> 2013/10/4 Hans Schwäbli <bugs.need.love....@gmail.com>
>
>> Hello Andreas,
>>
>> If this becomes a part of JBehave I would share the scenario, but since I
>> don't intend to use it (because of the reasons I wrote earlier), I cannot
>> do that. I work in the financial industry and must be very careful what I
>> share (which means spend extra time to be sure that it contains nothing
>> confidential). Sorry.
>>
>>
>> 2013/10/3 Andreas Ebbert-Karroum <andreas.ebbert-karr...@codecentric.de>
>>
>>> Hi Hans,
>>>
>>> do you mind sharing the scenario for which you get the NPE? A wild
>>> guess: You have an empty examples table in that scenario. The
>>> jbehave-junit-runner usually works fine for valid scenarios and stories.
>>> But, there may be bugs, in case you discover one, it'd be extremely nice,
>>> if you raise an issue on github:
>>>
>>>
>>> https://github.com/codecentric/jbehave-junit-runner/issues?milestone=none&state=open
>>>
>>> Kind Regards,
>>> Andreas
>>>
>>>
>>> 2013/10/3 Hans Schwäbli <bugs.need.love....@gmail.com>
>>>
>>>> Hello Andreas,
>>>>
>>>> thank you, this works.
>>>>
>>>> I had used
>>>> JUnitReportingRunner.recommandedControls(configuredEmbedder()) in the
>>>> beginning, but had a StackOverflowError.
>>>>
>>>> Now I discovered that I have misplaced this code line.
>>>>
>>>> But I get another error now:
>>>>
>>>>  java.lang.NullPointerException
>>>>  at
>>>> de.codecentric.jbehave.junit.monitoring.JUnitScenarioReporter.example(JUnitScenarioReporter.java:187)
>>>>  at
>>>> org.jbehave.core.reporters.DelegatingStoryReporter.example(DelegatingStoryReporter.java:85)
>>>>  at
>>>> org.jbehave.core.reporters.ConcurrentStoryReporter.example(ConcurrentStoryReporter.java:197)
>>>>  at
>>>> org.jbehave.core.embedder.StoryRunner.runScenariosParametrisedByExamples(StoryRunner.java:405)
>>>>  at
>>>> org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:301)
>>>>  at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:219)
>>>>  at
>>>> org.jbehave.core.embedder.StoryRunner.runGivenStories(StoryRunner.java:386)
>>>>  at
>>>> org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:270)
>>>>  at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:219)
>>>>  at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:180)
>>>>  at
>>>> org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229)
>>>>  at
>>>> org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201)
>>>>  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>>>>  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>>>>  at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>  at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>  at java.lang.Thread.run(Thread.java:724)
>>>> The actions are not executed because of this. Nevertheless the JUnit
>>>> view says the test is a success.
>>>>
>>>> No, really, JUnitReportingRunner is not reliable at all for me.
>>>>
>>>> Even without these bugs and tricky configurations of it, the
>>>> information it shows in the JUnit view are wrong since it does not show the
>>>> given stories.
>>>>
>>>> Because of this I will not use it. I need a reliable and complete test
>>>> result, so I will look into the JBehave result protocol.
>>>>
>>>>
>>>> 2013/9/30 Andreas Ebbert-Karroum <andreas.ebbert-karr...@codecentric.de
>>>> >
>>>>
>>>>> Hi Alex,
>>>>>
>>>>> I'd love to do that as well! However, this is (to the best of my
>>>>> knowledge) not possible due to some limitiations in JUnit and the
>>>>> JUnit-View in eclipse itself. Let's see if I remember correctly what
>>>>> happens: A JUnit-Test maps to a step, a suite to a scenario or story. 
>>>>> Every
>>>>> unit test in JUnit is only executed once, while steps can be executed
>>>>> possibly multiple times. That's why we have something like a name
>>>>> uniquifier that appends invisible characters, if a step is used multiple
>>>>> times.
>>>>>
>>>>> But, the methods in JUnit to construct Descriptions only take a class
>>>>> and a name as String, and that name has to be unique. Hence, I could no 
>>>>> map
>>>>> it to a method name, that is potentially not unique.
>>>>>
>>>>> See the method addSuite in the very end:
>>>>> https://github.com/codecentric/jbehave-junit-runner/blob/master/src/main/java/de/codecentric/jbehave/junit/monitoring/JUnitReportingRunner.java
>>>>>
>>>>> And JUnits API docs:
>>>>> http://www.cs.rice.edu/~javaplt/javadoc/junit4.4/org/junit/runner/Description.html
>>>>>
>>>>> But, since this is open source. If you can figure out a way, by all
>>>>> means, let us know, send a pull request, whatever. I'd love to have that
>>>>> feature!
>>>>>
>>>>> Kind Regards,
>>>>> Andreas
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2013/9/30 Alex Filatau <fila...@gmail.com>
>>>>>
>>>>>> Sorry for a bit of off topic, but jbehave-junit-runner is indeed
>>>>>> great addition for running JBehave tests and I'd vote for inclusion of it
>>>>>> into standard package if it's proper place to do so. The only thing I'd
>>>>>> love to see there now is ability to go to the step candidate definition 
>>>>>> by
>>>>>> click in the JUnit report in Eclipse.
>>>>>>
>>>>>> Regards,
>>>>>> Alex Filatau.
>>>>>>
>>>>>>
>>>>>> On Mon, Sep 30, 2013 at 12:33 AM, Hans Schwäbli <
>>>>>> bugs.need.love....@gmail.com> wrote:
>>>>>>
>>>>>>> I wanted to suggest that the JBehave people add such a feature to
>>>>>>> JBehave. It does not make much sense to me to run it as JUnit test and
>>>>>>> seeing nearly nothing in the JUnit view but only in the logs. And a good
>>>>>>> quality of this feature would be more likely.
>>>>>>>
>>>>>>> Besides this, the Codecentric addon is not as I expect it. If a
>>>>>>> story has given stories then the JUnit view does not show the given 
>>>>>>> stories
>>>>>>> (which must be executed first) but only the actual story.
>>>>>>>
>>>>>>> As ist seems Codecentric does not use the GivenStories as they are
>>>>>>> inteded by JBehave, because they seem to be using them just to read 
>>>>>>> common
>>>>>>> data (this is how they consulted a cutomer to do).
>>>>>>>
>>>>>>> But okay, here is the Stacktrace for you. Maybe you can fix and
>>>>>>> improve it:
>>>>>>>
>>>>>>> Reports view generated with 0 stories (of which 0 pending)
>>>>>>> containing 0 scenarios (of which 0 pending)
>>>>>>> java.lang.RuntimeException:
>>>>>>> org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in
>>>>>>> running stories:
>>>>>>> stories/logout.story:
>>>>>>> org.jbehave.core.embedder.StoryManager$StoryExecutionFailed:
>>>>>>> stories/logout.story
>>>>>>>  at
>>>>>>> de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner.run(JUnitReportingRunner.java:81)
>>>>>>>  at
>>>>>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>>>>>>>  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)
>>>>>>> Caused by: org.jbehave.core.embedder.Embedder$RunningStoriesFailed:
>>>>>>> Failures in running stories:
>>>>>>> stories/logout.story:
>>>>>>> org.jbehave.core.embedder.StoryManager$StoryExecutionFailed:
>>>>>>> stories/logout.story
>>>>>>>  at
>>>>>>> org.jbehave.core.embedder.Embedder$ThrowingRunningStoriesFailed.handleFailures(Embedder.java:495)
>>>>>>>  at
>>>>>>> org.jbehave.core.embedder.Embedder.handleFailures(Embedder.java:224)
>>>>>>>  at
>>>>>>> org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:205)
>>>>>>>  at
>>>>>>> de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner.run(JUnitReportingRunner.java:79)
>>>>>>>  ... 6 more
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2013/9/27 Robert Hostlowsky <robert.hostlow...@codecentric.de>
>>>>>>>
>>>>>>>> Hi Hans,
>>>>>>>>
>>>>>>>> thanks for your description. So there is a problem when running this
>>>>>>>> in the Eclipse junit view, right?
>>>>>>>> Can you provide a short snapshot, or just the stacktrace from the
>>>>>>>> console view?
>>>>>>>>
>>>>>>>> Thx, Robert
>>>>>>>> --
>>>>>>>>
>>>>>>>> Robert Hostlowsky | Senior Software Developer | Agile Software
>>>>>>>> Factory
>>>>>>>>
>>>>>>>> codecentric AG | Landsberger Straße 302 | 80687 München |
>>>>>>>> Deutschland
>>>>>>>> www.codecentric.de
>>>>>>>>
>>>>>>>> | blog.codecentric.de
>>>>>>>> | www.meettheexperts.de
>>>>>>>> | www.more4fi.de
>>>>>>>>
>>>>>>>> 2013/9/27 Hans Schwäbli <bugs.need.love....@gmail.com>:
>>>>>>>> > As it seems some people from Codecentric have written a custom
>>>>>>>> JUnit-Runner
>>>>>>>> > for JBehave.
>>>>>>>> >
>>>>>>>> > It shows what stories and scenarios are run in the Eclipse JUnit
>>>>>>>> view, even
>>>>>>>> > hierarchical.
>>>>>>>> >
>>>>>>>> > https://github.com/codecentric/jbehave-junit-runner
>>>>>>>> >
>>>>>>>> https://blog.codecentric.de/files/2012/06/JBehave_JUnit_Results_for_Scenarios_and_Steps.png
>>>>>>>> >
>>>>>>>> > But it does not seem to work correctly for jbehave-web-3.6 since
>>>>>>>> a exception
>>>>>>>> > occurs.
>>>>>>>> >
>>>>>>>> > Maybe some talented guy can contribute such an feature to JBehave?
>>>>>>>> >
>>>>>>>> > I would contribute it myself, but I don't know the JBehave and
>>>>>>>> JUnit details
>>>>>>>> > good enough.
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>>
>>>>>>>>     http://xircles.codehaus.org/manage_email
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Mit freundlichen Grüßen / Best regards
>>>>>
>>>>> Andreas Ebbert-Karroum | Agile Principal Consultant
>>>>>
>>>>> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
>>>>> tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49
>>>>> (0) 175.2664109
>>>>> www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
>>>>> www.more4fi.de
>>>>>
>>>>> Sitz der Gesellschaft: Düsseldorf | HRB 63043
>>>>> Vorstand: Klaus Jäger (Vorsitzender) . Michael Hochgürtel . Mirko
>>>>> Novakovic . Rainer Vehns
>>>>> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann .
>>>>> Jürgen Schütz
>>>>>
>>>>> Diese E-Mail einschließlich evtl. beigefügter Dateien enthält
>>>>> vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht
>>>>> der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
>>>>> informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und
>>>>> evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder
>>>>> Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser
>>>>> E-Mail ist nicht gestattet.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Mit freundlichen Grüßen / Best regards
>>>
>>> Andreas Ebbert-Karroum | Agile Principal Consultant
>>>
>>> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
>>> tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0)
>>> 175.2664109
>>> www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
>>> www.more4fi.de
>>>
>>> Sitz der Gesellschaft: Düsseldorf | HRB 63043
>>> Vorstand: Klaus Jäger (Vorsitzender) . Michael Hochgürtel . Mirko
>>> Novakovic . Rainer Vehns
>>> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen
>>> Schütz
>>>
>>> Diese E-Mail einschließlich evtl. beigefügter Dateien enthält
>>> vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht
>>> der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
>>> informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und
>>> evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder
>>> Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser
>>> E-Mail ist nicht gestattet.
>>>
>>
>>
>
>
> --
> Mit freundlichen Grüßen / Best regards
>
> Andreas Ebbert-Karroum | Agile Principal Consultant
>
> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
> tel: +49 (0) 212.23362825 | fax: +49 (0) 212.23362879 | mobil: +49 (0)
> 175.2664109
> www.codecentric.de | blog.codecentric.de | www.meettheexperts.de |
> www.more4fi.de
>
> Sitz der Gesellschaft: Düsseldorf | HRB 63043
> Vorstand: Klaus Jäger (Vorsitzender) . Michael Hochgürtel . Mirko
> Novakovic . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Bernd Klinkmann . Jürgen
> Schütz
>
> Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche
> und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
> Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie
> bitte sofort den Absender und löschen Sie diese E-Mail und evtl.
> beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen
> evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist
> nicht gestattet.
>

Reply via email to