BDD for C#?


#1

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/2008/02/26/updates-to-nb
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


#2

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/2008/05/08/introducing-machine-specifications-or-mspec-for-short.aspx

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

http://groups.google.com/group/behaviordrivendevelopment?hl=en

HTH,
Ben


#3

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/behaviordrivendevelopment?hl=en

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


#4

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


#5

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/ironruby-and-net

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


#6

On Sun, Apr 26, 2009 at 12:32 PM, aslak hellesoy
removed_email_address@domain.invalidwrote:

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


#7

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


#8

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


#9

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


#10

for Acceptance testing, would you like to checkout Ben’s article at -
http://msdn.microsoft.com/en-us/magazine/dd453038.aspx

-Jirapong


#11

http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net
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


#12

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


#13

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


#14

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


#15

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


#16

On Sun, Apr 26, 2009 at 6:32 AM, aslak hellesoy
removed_email_address@domain.invalidwrote:

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,


#17

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