On 14/04/2010 00:08, Brian Repko wrote:
> Mauro,
>  
> Thanks for the feedback - it actually was a great experience creating
> the example and I found it far more easy and far more effective than
> regular JUnit/mock type testing.

Yes, I agree.  Although, I think BDD is actually complementary to TDD -
not a replacement for it.
 
> I saw the 2 tasks that you added to the JIRA, so thank you for that.
>
> The hamcrest issue is that in Eclipse, one can add a JUnit4
> "container" which includes junit.jar and a hamcrest.jar which, being
> in Eclipse are connected via OSGi.  When I used the JUnit4 container
> and hamcrest along with jbehave, I got really strange OSGi issues
> related to exported versions of the hamcrest jar.  The workaround is
> not to use the JUnit4 container if you need hamcrest in your set of
> libraries.  When I included them on the regular classpath, everything
> was fine.  This seems to be more of a JUnit4 Eclipse container issue
> than a jbehave one - its just that in needing the hamcrest dependency,
> I hit this error.  Its not your bug and there is nothing you can do
> about it.

May have to do with the fact that junit 4.4 jar onwards bundles
hamcrest.jar.  This IMO was a bad decision as it will cause no end of
classloading issues, unless the dependencies bundled are not "shaded". 
It was also the reason I convinced the junit folks to release an
additional jar - junit-dep - which has the dependencies (notably
hamcrest) not bundled.   You may want to check if you can configure the
use of junit-dep.jar instead of junit.jar.
 
> As for the Spring integration, I see alot of promise in marking Steps
> classes with @Component so that Spring will notice them and Autowire
> the dependencies - just makes them super easy to create.  The problem
> is that creating the container in the Story/Scenario constructor
> doesn't work well with JUnit since JUnit constructs all the objects
> before running tests.  The container needs to be created during the
> TestRunner but I wasn't sure if doing an addSteps call then would be
> too late.  I'll take a look at the 3.0 stuff.  Again - thanks for
> creating the task in JIRA.
>  
> Again, being a big Spring fan, I'm interested in making the Spring
> integration top notch and I'll be happy to work on that.

Well, your contribution would be most welcome :-)   Yes, in 3.0 we're
trying to "play nice" with lazy instantiation.  So let's keep the
conversation flowing ...
 
> Thanks again for your work on JBehave - the room was packed (~40
> people) and there is clearly interest in both JBehave and Cucumber. 
> My goal is for a simple tool that does the job so I really want
> JBehave to be it.  Thanks for presenting at Agile 2009 in Chicago -
> that is where I saw what you and Paul have created (I sat in the front
> and asked a bunch of questions).

Very glad that you found it useful and that it introduced you to JBehave.

Cheers

Reply via email to