Forum: RSpec BDD for C#?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Brandon O. (Guest)
on 2009-04-25 08:24
(Received via mailing list)
Hi,

I know this is slightly off topic, but I'm having trouble finding
something,
and wondered if anyone here had experience with any BDD frameworks for
C#.

I found NBehave (http://www.codeplex.com/NBehave), but it seems a little
out
of date (last release says 2007 I think). I also found this post
(http://www.lostechies.com/blogs/joe_ocampo/archive...
ehave.aspx) which has a different syntax, but can't find what has
happened
to it since that post. Also, I really hate that the methods use
underscores,
though I don't know if that's their convention, or a requirement.

Does anyone else here use C#? What do you use for testing / specs?

Thanks,
Brandon

www.perpetualseeker.com
Blog about college, programming, and other random things.
Follow me on Twitter: http://twitter.com/devbanana
Ben M. (Guest)
on 2009-04-25 10:13
(Received via mailing list)
Brandon O. wrote:
> though I don't know if that's their convention, or a requirement.
>
> Does anyone else here use C#? What do you use for testing / specs?
>
> Thanks,
> Brandon
>
>
>
I haven't used C# for years, so I don't have any experience with BDD
frameworks in it but you might want to check out MSpec:

http://github.com/machine/machine.specifications/tree/master

http://codebetter.com/blogs/aaron.jensen/archive/2...

You may also want to post your question to the BDD google group:

http://groups.google.com/group/behaviordrivendevel...

HTH,
Ben
Brandon O. (Guest)
on 2009-04-26 08:01
(Received via mailing list)
> > I know this is slightly off topic, but I'm having trouble finding
> > ehave.aspx) which has a different syntax, but can't find what has
> >
>
> http://groups.google.com/group/behaviordrivendevel...
>
> HTH,
> Ben

Thanks a lot for the links. I didn't realize there was a BDD group,
which is
why I posted here, but I will check that out, too.

> _______________________________________________
> rspec-users mailing list
> removed_email_address@domain.invalid
> http://rubyforge.org/mailman/listinfo/rspec-users
www.perpetualseeker.com
Blog about college, programming, and other random things.
Follow me on Twitter: http://twitter.com/devbanana
Phlip (Guest)
on 2009-04-26 09:14
(Received via mailing list)
Brandon O. wrote:

> I know this is slightly off topic, but I'm having trouble finding
> something,
> and wondered if anyone here had experience with any BDD frameworks
> for C#.

Why not replicate Cucumber in C#?

Not port or link, replicate. It's only like ~10 features, right? I don't
know
C#, but I could do it in C++ in a couple days.

--
   Phlip
   http://flea.sourceforge.net/resume.html
Aslak H. (Guest)
on 2009-04-26 14:54
(Received via mailing list)
On Sun, Apr 26, 2009 at 7:06 AM, Phlip <removed_email_address@domain.invalid> 
wrote:

> Brandon O. wrote:
>
>  I know this is slightly off topic, but I'm having trouble finding
>> something,
>> and wondered if anyone here had experience with any BDD frameworks
>> for C#.
>>
>
> Why not replicate Cucumber in C#?
>

Cucumber has been working with .NET for a while:
http://wiki.github.com/aslakhellesoy/cucumber/iron...

IronRuby was really slow last time I tried (4-5 months ago), so unless
it
has improved its speed it will be too slow for practical use. On the
other
hand, if IronRuby matures, Cucumber should work well with .NET. It
already
does for Java (using JRuby).

I recently added pure java support to Cucumber, meaning steps can be
written
in Java instead of Ruby.
http://github.com/aslakhellesoy/cucumber_java/tree/master

This obviously makes it easier to use for Java programmers. It should be
fairly easy to implement similar pure C# support. But a quicker IronRuby
is
still needed.

Aslak
Aslak H. (Guest)
on 2009-04-26 15:14
(Received via mailing list)
On Sun, Apr 26, 2009 at 12:32 PM, aslak hellesoy
<removed_email_address@domain.invalid>wrote:

>>>
> does for Java (using JRuby).
>
> I recently added pure java support to Cucumber, meaning steps can be
> written in Java instead of Ruby.
> http://github.com/aslakhellesoy/cucumber_java/tree/master
>
> This obviously makes it easier to use for Java programmers. It should be
> fairly easy to implement similar pure C# support. But a quicker IronRuby is
> still needed.
>

And a more stable one it seems:
http://twitter.com/niclasnilsson/statuses/1605950974
Brandon O. (Guest)
on 2009-04-27 13:14
(Received via mailing list)
> > something,
> > and wondered if anyone here had experience with any BDD frameworks
> > for C#.
>
> Why not replicate Cucumber in C#?
>
> Not port or link, replicate. It's only like ~10 features, right? I
> don't know
> C#, but I could do it in C++ in a couple days.
>

I'm not sure I'd be interested in that. I mean I'm creating a GUI
application, so I'm not really sure how Cucumber could work with that.

Well to be more specific, I'm creating a game for blind people, so it's
purely sound output and keyboard control. But either way I don't see how
Cucumber could work with it.

More interested in RSpec for testing the logic. Though I am curious if
you
know of some way I could use Cucumber as well.

Right now looking at either nBehave or SpecUnit.NET. I will miss the
nested
contexts of RSpec though.

Brandon

> --
>    Phlip
>    http://flea.sourceforge.net/resume.html
>
> _______________________________________________
> rspec-users mailing list
> removed_email_address@domain.invalid
> http://rubyforge.org/mailman/listinfo/rspec-users

www.perpetualseeker.com
Blog about college, programming, and other random things.
Follow me on Twitter: http://twitter.com/devbanana
Aslak H. (Guest)
on 2009-04-27 14:03
(Received via mailing list)
> >
> >
>
> I'm not sure I'd be interested in that. I mean I'm creating a GUI
> application, so I'm not really sure how Cucumber could work with that.
>
> Well to be more specific, I'm creating a game for blind people, so it's
> purely sound output and keyboard control. But either way I don't see how
> Cucumber could work with it.
>

The limitation is not in Cucumber, but in your ability to interact with
your
program from ruby code (or Java code if you're using cucumber_java).
If you can interact with your program (input stuff and observe output)
then
you can use Cucumber.

Just put your interaction code inside Cucumber step definitions.

Aslak
Jirapong N. (Guest)
on 2009-04-27 18:02
(Received via mailing list)
May be you should check out this "Getting Started With IronRuby And
RSpec"

http://msdn.microsoft.com/en-us/magazine/dd434651.aspx

Hope this helps,
-Jirapong
Brandon O. (Guest)
on 2009-04-27 19:36
(Received via mailing list)
> http://wiki.github.com/aslakhellesoy/cucumber/iron...
> This obviously makes it easier to use for Java programmers. It should
> be fairly easy to implement similar pure C# support. But a quicker
> IronRuby is still needed.
>

Thanks, that does look interesting. Does RSpec work along with it
though, or
are the step definitions written in C#?

I might try it, if I can find a way to do acceptance tests for this
application. It might not be as hard as I thought.

Brandon

>
>
>   _______________________________________________
>   rspec-users mailing list
>   removed_email_address@domain.invalid
>   http://rubyforge.org/mailman/listinfo/rspec-users
>
>

www.perpetualseeker.com
Blog about college, programming, and other random things.
Follow me on Twitter: http://twitter.com/devbanana
Jirapong N. (Guest)
on 2009-04-27 19:56
(Received via mailing list)
for Acceptance testing, would you like to checkout Ben's article at -
http://msdn.microsoft.com/en-us/magazine/dd453038.aspx

-Jirapong
Aslak H. (Guest)
on 2009-04-27 20:01
(Received via mailing list)
> > Cucumber has been working with .NET for a while:
> >
> > This obviously makes it easier to use for Java programmers. It should
> > be fairly easy to implement similar pure C# support. But a quicker
> > IronRuby is still needed.
> >
>
> Thanks, that does look interesting. Does RSpec work along with it though,
> or
> are the step definitions written in C#?
>

I think you mean: "Does IronRuby work along with RSpec". The answer is
*maybe*. IronRuby doesn't work with most things yet.

Step definitions would have to be written in Ruby until I implement
something similar to cucumber_java (cucumber_dotnet), which would let
you
write step definitions in any .NET language that supports an annotation
mechanism.

Aslak
Brandon O. (Guest)
on 2009-04-28 04:00
(Received via mailing list)
> *maybe*. IronRuby doesn't work with most things yet.
>

For now, the answer appears to be no, unfortunately. I'll have to come
back
to it in a few months when it's hopefully more stable.

NBehave looks really nice, but unfortunately there is really no
documentation for it at all, except for a few examples of usage. I think
it's either that or NUnit with naming conventions, but I really like the
scenario support in NBehave.

Brandon

>   I might try it, if I can find a way to do acceptance tests for
>   >       Not port or link, replicate. It's only like ~10 features,
>   >       removed_email_address@domain.invalid
>   _______________________________________________
>
>   rspec-users mailing list
>   removed_email_address@domain.invalid
>   http://rubyforge.org/mailman/listinfo/rspec-users
>
>

www.perpetualseeker.com
Blog about college, programming, and other random things.
Follow me on Twitter: http://twitter.com/devbanana
Dan N. (Guest)
on 2009-04-28 06:02
(Received via mailing list)
Hi Brandon.

I already replied on the BDD list but can I suggest you give the nbehave
guys a poke, or even get involved in helping them out?

If they started getting some releases out it would really help build
some
momentum around it.

Cheers,
Dan

2009/4/28 Brandon O. <removed_email_address@domain.invalid>
Brandon O. (Guest)
on 2009-04-28 08:37
(Received via mailing list)
> nbehave guys a poke, or even get involved in helping them out?
>
> If they started getting some releases out it would really help build
> some momentum around it.
>
> Cheers,
> Dan
>

Yeah, I think I will. It looks like the best right now, anyway.

I'm not sure I could help much, though I could perhaps help with
documentation if anything, but I will contact them.

Thanks,
Brandon

>
>   >
> like the
> an
>   >       application. It might not be as hard as I thought.
>   > right?
>   >       >       removed_email_address@domain.invalid
>   >       _______________________________________________
>
>
>   _______________________________________________
>   rspec-users mailing list
>   removed_email_address@domain.invalid
>   http://rubyforge.org/mailman/listinfo/rspec-users
>
>

www.perpetualseeker.com
Blog about college, programming, and other random things.
Follow me on Twitter: http://twitter.com/devbanana
John G. (Guest)
on 2009-04-29 08:18
(Received via mailing list)
On Sun, Apr 26, 2009 at 6:32 AM, aslak hellesoy
<removed_email_address@domain.invalid>wrote:

>
> I recently added pure java support to Cucumber, meaning steps can be
> written in Java instead of Ruby.
> http://github.com/aslakhellesoy/cucumber_java/tree/master
>


and I've been introducing a java team to real storytest driven
development
as a result.

Just in time too, the Scala testing frameworks are also heating up!
Anyways, thanks Aslak for what I would call friggin' awesome response
time.
I've sent requests to you re: cucumber-java and I don't think it's ever
been
less than a few hours before you replied or fixed things - as a result,
cucumber-java is working great for us on this current project!

thanks again,
Aslak H. (Guest)
on 2009-04-29 10:22
(Received via mailing list)
>
> and I've been introducing a java team to real storytest driven development
> as a result.
>
> Just in time too, the Scala testing frameworks are also heating up!
> Anyways, thanks Aslak for what I would call friggin' awesome response time.
> I've sent requests to you re: cucumber-java and I don't think it's ever been
> less than a few hours before you replied or fixed things - as a result,
> cucumber-java is working great for us on this current project!
>

Thanks a lot John! It's great to hear success stories like that. If you
run
into any problems with it, please use the GitHub tracker in
cucumber_java
(instead of Lighthouse). And if you want to share some experience, the
Wiki
is there. I'll move the READMEs to the wiki soon.

Cheers,
Aslak
This topic is locked and can not be replied to.