I'll have to take a look at your approach. I must admit that I am a jbehave
novice and you may have found an easier way. Here's a couple of things that I
can remember from my implementation.
1. I disliked the StoryReporter interface as it almost forced me to write code
that was not thread-safe. I wrote a StoryReporter2 interface (and an adapter
with a ThreadLocal) so that I could write "cleaner" code.
2. I seem to remember that I had to do something nasty in order to refresh the
steps instance before each test as it could contain "dirty" variables.
3. To get deep integration with JUnit, I needed to extend ParentRunner instead
of BlockJUnit4ClassRunner as is done in jbehave
4. My code was able to support a method annotated with @Steps which could
provide a collection of steps instances.
Cheers,
Lance.
________________________________
From: [email protected] [mailto:[email protected]] On Behalf
Of Daniel Schneller
Sent: 14 May 2012 10:24
To: [email protected]
Subject: Re: [jbehave-user] Announcement: Beta Release of new
jbehave-junit-runner
Interesting, for some reason we did not see this when we began moving the
old implementation from Google Code forward. Would have been good to know.
I downloaded the project and browsed through it. I have not looked in too
much detail at your code, but it seems a bit more complicated than what we
have done. We only have 4 classes with about 500 LOC total. It is based on
the StoryReporter interface in JBehave and does not use much more.
We would love to get feedback on how good people think it is and what's
missing. We hope we'll be able to keep it so small, because that would
(hopefully) keep it more maintainable as well. Currently we were not
thinking about getting it included in the main JBehave project, but maybe
in the future it could be.
Daniel
On Mon, May 14, 2012 at 10:00 AM, <[email protected]> wrote:
I did this myself last year but unfortunately I needed to re-invent the
wheel to much for it to be accepted by the jbehave team. I have attached a
maven project here http://jira.codehaus.org/browse/JBEHAVE-551 which includes
two junit runners and some test cases that use them.
My initial driver for doing this was that the jbehave spring runner was
not using a new app context for each test run when using @DirtiesContext (I'm
not sure if this has been fixed by now). I have included a Spring runner which
properly cleans up after each test when using @DirtiesContext.
Cheers,
Lance.
________________________________
From: Andreas Ebbert-Karroum
[mailto:[email protected]]
Sent: 13 May 2012 15:43
To: [email protected]
Cc: Daniel Schneller
Subject: [jbehave-user] Announcement: Beta Release of new
jbehave-junit-runner
Hi,
it has always been a problem that when jbehave is run via junit, the
reporting to junit was less than helpful. With the jbehave-junit-runner all
your stories, scenarios and steps are reported to JUnit. We based the library
on the inital work of Mark Burnett and Aaron von der Haar.
You find the project now hosted on GitHub. Please feel free to raise
issues, when things don't work for you.
https://github.com/codecentric/jbehave-junit-runner
The final release will be made available on maven central, but we
wanted to give the community the possibility to provide early feedback.
Have fun. We hope you find that useful!
--
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
<tel:%2B49%20%280%29%20212.23362879> | mobil: +49 (0) 175.2664109
<tel:%2B49%20%280%29%20175.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) | 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.
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mails are not encrypted and cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities
or related financial instruments.
UBS Limited is a company limited by shares incorporated in the United
Kingdom registered in England and Wales with number 2035362.
Registered office: 1 Finsbury Avenue, London EC2M 2PP. UBS Limited
is authorised and regulated by the Financial Services Authority.
UBS AG is a public company incorporated with limited liability in
Switzerland domiciled in the Canton of Basel-City and the Canton of
Zurich respectively registered at the Commercial Registry offices in
those Cantons with Identification No: CH-270.3.004.646-4 and having
respective head offices at Aeschenvorstadt 1, 4051 Basel and
Bahnhofstrasse 45, 8001 Zurich, Switzerland. Registered in the
United Kingdom as a foreign company with No: FC021146 and having a
UK Establishment registered at Companies House, Cardiff, with No:
BR 004507. The principal office of UK Establishment: 1 Finsbury Avenue,
London EC2M 2PP. In the United Kingdom, UBS AG is authorised and
regulated by the Financial Services Authority.
UBS reserves the right to retain all messages. Messages are protected
and accessed only in legally justified cases.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
--
Daniel Schneller
[email protected]
Twitter: @dschneller
http://www.danielschneller.com - Java, MySQL, Windows, Linux and other
insanities.
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mails are not encrypted and cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities
or related financial instruments.
UBS Limited is a company limited by shares incorporated in the United
Kingdom registered in England and Wales with number 2035362.
Registered office: 1 Finsbury Avenue, London EC2M 2PP. UBS Limited
is authorised and regulated by the Financial Services Authority.
UBS AG is a public company incorporated with limited liability in
Switzerland domiciled in the Canton of Basel-City and the Canton of
Zurich respectively registered at the Commercial Registry offices in
those Cantons with Identification No: CH-270.3.004.646-4 and having
respective head offices at Aeschenvorstadt 1, 4051 Basel and
Bahnhofstrasse 45, 8001 Zurich, Switzerland. Registered in the
United Kingdom as a foreign company with No: FC021146 and having a
UK Establishment registered at Companies House, Cardiff, with No:
BR 004507. The principal office of UK Establishment: 1 Finsbury Avenue,
London EC2M 2PP. In the United Kingdom, UBS AG is authorised and
regulated by the Financial Services Authority.
UBS reserves the right to retain all messages. Messages are protected
and accessed only in legally justified cases.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email