The recommended way is to use the StepsFactory because that what's used by the runner to support multi-threading. The addSteps() method is still supported for backward compatibility and it creates under the hood a ProvidedStepsFactory.

Cheers

On 14/05/2012 14:31, HAAS Christian wrote:

Hello again;

As for reporting missing steps as error or silently ignoring them: Good idea to base that on JBehaves own configuration settings.

Regarding priorities, I’d be happy enough with the JUnitStory based runner; I just saw you already patched that – thanks a lot, works for me now and we can start using it.

I still had to modify my setup a bit: So far we were only using JUnitStory.addSteps(), which adds to the list returned from JUnitStory.candidateSteps() .

But your runner uses ConfigurableEmbedder.stepsFactory().createCandidateSteps() . In my case, the factory was null. I’m now returning a ProvidedStepsFactory that receives the result of candidateSteps() :) .

Apparently, these two methods of steps provision are present in parallel and I still haven’t found out what the intended way to provide them is. I only see Embedder.reportStepdocsAsEmbeddables() in jbehave.core doing a dual variant (if candidateSteps() returns an empty list, it uses the factory).

Thanks again!

ch

____________________________________________________
*Christian Haas**
*Software Engineer
FREQUENTIS AG

Innovationsstraße 1, 1100 Vienna, Austria
Phone   +43-1-811 50 – 8353
Mobile   +43-664-60 850 – 8353
Fax       +43-1-811 50 – 77 8353
Webwww.frequentis.com
E-Mail [email protected] <mailto:[email protected]>

Handelsgericht Wien (Vienna Commercial Court): FN 72115 b

DVR 0364797, ATU 14715600

____________________________________________________
Diese E-Mail könnte vertrauliche und/oder rechtlich geschützte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

*From:*Andreas Ebbert-Karroum [mailto:[email protected]]
*Sent:* Montag, 14. Mai 2012 12:18
*To:* [email protected]
*Subject:* Re: [jbehave-user] Announcement: Beta Release of new jbehave-junit-runner

Hi,

thank you for trying it out, and your initial - and very helpful - feedback!

2012/5/14 HAAS Christian <[email protected] <mailto:[email protected]>>

    I did some tests and have found the following things:- JUnitStory
    is not supported, only JUnitStories

    We’re using the single-story embedder and while a switch could be
    done with not much effort, it would be great if your runner would
    be capable of handling this case on its own.

I know there are myriad ways to configure JBehave, some are working already, most of them probably are not. Thanks for making us aware of this one :)

    - Missing steps are not reported, related scenarios are OK

    If a new scenario is added with missing steps (no binding code
    exists), the steps are not added to the report tree and even
    worse, the scenario is marked OK.

    Personally I’d want those to be reported as failures (with a  stub
    implementation text extractable from the failure trace) – but I
    can imagine others might not want this behaviour; Is there a
    possibility to add configuration options to the JUnitReportingRunner?

    The missing steps should at least be reported as pending steps.

I agree. Missing steps should be reported. Reporting the scenario as failed or reporting pending steps, should be in line with the general reporting configuration in JBehave (PendingStepsStrategy, ...)

    - After/Before Story/Scenario not listed

    For me a minor issue: “After/Before Stories” is always listed
    although not present, but for Story or Scenario they are not
    listed, even when present.

    I guess this stems from the problem not to know which steps class
    has (or hasn’t) such methods and which one of them failed.

Hm, you could possible go through all Step classes and look for annotated methods. Should not be too much work.

Thanks for reporting this as issues. What's your order for them? (which one should be first?)

--

Mit freundlichen Grüßen / Best regards

Andreas Ebbert-Karroum | Bereichsleiter der Agilen Software Factory

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 <http://www.codecentric.de> | blog.codecentric.de <http://blog.codecentric.de> | www.meettheexperts.de <http://www.meettheexperts.de> | www.more4fi.de <http://www.more4fi.de>

Sitz der Gesellschaft: Düsseldorf | HRB 63043
Vorstand: Klaus Jäger (Vorsitzender) | 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