Hi Eric

Eric Lewin wrote:
Hi!

I was thinking that starting with JBehave would be something like this:
1. writing story text files with the customer
2. Generating the code for givens, event and outcomes with Ensure.pending()
3. Run the story textfile
4. Implement some givens, event and outcomes (in a BDD style of development with behaviour testing)
And iterate to step 3 again and again till there are no more Pendings.

But I can't make JBehave version 1.0.1 to neither run a story textfile nor generate code. (See bugs and suggestions further down)
It seems that I must handcraft all my code, even the stories.
Does nobody work in my suggested way of developing stories? Is it a naive approach? I was thinking it would be a way to speed up development of a stories, but maybe the stories change so much during a project that it is better to have them in code to benefit from the refactoring tools in the IDE? Are their other good reasons for not letting the text files drive the code or for not generating the code?


ATM, there is no stub-generation of the scenario components from the story text file, but I agree it could be a useful optional feature.

I say optional, because IMO, it's important to keep the Java-centric approach 
to stories and provide
rendering/parsing to external representations.


So here are the bugs I've encountered so far:
***StoryBuilder:
Bug #1: I was trying to use the maven plugin to run a story text file and I found out that when storyBuilder.story() is called the scenarios are not added to the story, so my text file runs successfully with 0 scenarios.

Can you provide a test case for this?   Ideally create a jira issue with 
attached all the
code/files that allows us to reproduce the problem.

FYI, there is an integration test suite for the maven plugin in
https://svn.codehaus.org/jbehave/trunk/plugins/maven/src/it/
It demostrates that scenarios are read and executed.

Bug #2: If I insert a call to story.specify() before running the story I get a class cast exception. The lists details.context.givens and details.context.outcomes are filled with strings and not BasicDetails

Bug #3: Classbuilder.newInstance(..) in StoryBuilder does not use the fullname when loading the class.

Again, test cases would be useful.

Feature suggestion #1: The TextStoryParser should accept newlines in the story text files. That would make the text files easier to read for human beings.


It does - although possibily not blank lines.  I agree blank lines can improve 
readability.
If you can provide the failing file we can investigate.


***CodeGenerator (I know, it is in the sandbox, but it gets distributed ;O): Bug #4: The sandbox/antlr/... directory have got a StoryGeneratorSpike that doesn't work. Bug #5: When I fix the code in the StoryGeneratorSpike and run it, I find out that the generated classes are bogus.

antlr is not used anymore - nor supported.

Feature suggestion #2: A generator that generates the code for givens, event and outcomes with PendingExceptions, but does not overwrite existing classes.

I agree.

Thanks


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to