On Tue, Apr 14, 2009 at 6:06 AM, Korny Sietsma <[email protected]> wrote:

> In case anyone followed this: I got everything working pretty nicely - now
> I have a cucumber formatter that automatically updates a confluence wiki.
>
> I still have to cover some bits like table outputs and the like, but the
> basics are pretty nice - I use cucumber to parse the features and create a
> wiki page per feature file with the (complete) feature, and I also check for
> scenarios with tags like "@story-blah", and update the corresponding story
> page in the wiki.
>
> I'm not sure this stuff is much use generally, it's pretty tightly coupled
> to how we have our wiki set up - but I'm happy to share the (messy) code if
> anyone is interested.
>

Why not share it as a http://gist.github.com/ ?

Aslak


> - Korny
>
>
> On Wed, Apr 8, 2009 at 4:24 PM, Korny Sietsma <[email protected]> wrote:
>
>> Hmm - on digging further, I might be better off writing a custom formatter
>> as described at
>> http://wiki.github.com/aslakhellesoy/cucumber/custom-formatters, and just
>> invoking cucumber with --dry-run and my formatter...  Though as I want to
>> use the html formatter to format steps for insertion into the wiki, I've
>> still got some work to do :)
>>
>> - korny
>>
>>
>> On Wed, Apr 8, 2009 at 11:01 AM, Korny Sietsma <[email protected]> wrote:
>>
>>> Hi folks,
>>> I'm writing some scripts to integrate our cucumber features with stories
>>> stored in a wiki, and I'm hoping to use cucumber's parser to parse the
>>> features rather than doing it manually.  (I don't really care about the
>>> feature contents much, just scenario titles and tags)
>>>
>>> I've worked out how to parse the features:
>>>       Cucumber.load_language('en')
>>>       features = Cucumber::Ast::Features.new
>>>       parser = Cucumber::Parser::FeatureParser.new
>>>
>>>       feature_files = Dir["#{FEATURE_DIR}/**/*.feature"]
>>>
>>>       feature_files.each do |f|
>>>         puts "parsing feature file #{f}"
>>>         features.add_feature(parser.parse_file(f))
>>>       end
>>>
>>> But now I'm digging in to the whole ast visitor thing, and it's getting
>>> quite complex to *do* stuff with the features once I've parsed them.
>>>
>>> I'm sure I can work this out myself, given time, but I was wondering if
>>> there are any code examples out there to save me some of the time/effort?
>>> Anyone else tried parsing features like this from outside Cucumber itself?
>>>
>>> Thanks!
>>>
>>> - Korny
>>>
>>> --
>>> Kornelis Sietsma  korny at my surname dot com
>>> "Every jumbled pile of person has a thinking part
>>> that wonders what the part that isn't thinking
>>> isn't thinking of"
>>>
>>
>>
>>
>> --
>> Kornelis Sietsma  korny at my surname dot com
>> "Every jumbled pile of person has a thinking part
>> that wonders what the part that isn't thinking
>> isn't thinking of"
>>
>
>
>
> --
> Kornelis Sietsma  korny at my surname dot com
> "Every jumbled pile of person has a thinking part
> that wonders what the part that isn't thinking
> isn't thinking of"
>
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to