Hi Eric,

We're hoping to have Story generation in a future release. Yes, it would 
definitely be useful; no, it's not a naive approach.

For the moment, please generate your stories by hand. It may help you to 
generate the code, then use the StoryPrinter / StoryPrinterToDirectory to 
round-trip back to plain text.

Thank you very much for your feedback!

Cheers,
Liz.




Eric Lewin <[EMAIL PROTECTED]> 
16/05/2007 17:21
Please respond to
[email protected]


To
[EMAIL PROTECTED], [email protected]
cc

Subject
[jbehave-user] Starting up with JBehave and encountering bugs in 
StoryBuilder and story generator makes me wonder why those features are 
not in use.






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?



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.

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.

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.


***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.

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

Regards,
Eric

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

    http://xircles.codehaus.org/manage_email


Reply via email to