I'm a Rails developer doing TDD on a Mac with RSpec, Capybara and Selenium webdriver. Now I have been asked by my company to use this approach for a .NET on Windows environment. What is the best way of doing this?

I could just install Ruby and use RSPEC, Capybara and Selenium webdriver for integration testing. But what about unit tests? I also looked at NSpec, but I'm not sure if I can combine that with Capybara or Selenium for integration tests.

What would be a good approach here?


2 Answers 2


This is a problem in two parts.

In terms of functional / integration testing where you are driving the software externally then either approach is valid, the consideration here is the skillset of those creating and maintaining the tests. Broadly I see a tendency towards familiarity with the language used for tools (test/build/whatever) as being the most important thing if you don't want to end up with a single domain expert that the team depends on.

However for unit testing it has to be something that works within the .NET development environment - xUnit (or nUnit, but I much prefer xUnit) is the "conventional" choice, but I see no reason not to use NSpec.

If you want to go all .NET then Coypu was inspired by Capybara


I would abandon Ruby and go with nUnit, SpecFlow and Selenium WebDriver for unit, integration and UI tests if the product is written in .net. Also, I would swap the mac for a windows machine.

I know its possible to mix languages and platforms, and I have written ruby tests for .net products. But it's just a little easier if you use the same stack for everything.

You can add your test projects to the same solution and drive the whole thing off the same build process. Developers will be able to run the tests from within visual studio with a couple of clicks. Plus its a new skill on your CV.

But primarily its not having worry about having to install the extra products, find the third party bits and bobs they make them play together and maintaining a complicated CI process.

  • Or keep the Mac and install parallels...
    – Murph
    Commented Dec 18, 2017 at 21:13
  • why use inferior hardware though?
    – Ewan
    Commented Dec 18, 2017 at 21:14
  • Because by and large a Mac is not inferior in hardware terms (touchbar aberration aside)? Certainly not to the PC hardware people are offered as a rule
    – Murph
    Commented Dec 18, 2017 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.