2

I'm wanting to do some integration tests on our ASP.NET website. I'd like to run these tests:

  • Integration tests on a headless browser or selenium without having to rewrite code. Would like it to integrate with the Visual Studio 2012 Test Explorer.
  • Unit tests for C# code.
  • Unit tests for Javascript.

I liked the look of Jasmine and SpecFlow, but I'd like to limit the testing frameworks I have to learn. I also found Coypu, which looks like it may be useful, as it is a .NET alternative to Capybara.

What frameworks could cover these requirements?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Caleb Jares
  • 6,163
  • 6
  • 56
  • 83

2 Answers2

1

Try testing Specifications rather than integration testing if possible - read 'Specification by Example' (http://specificationbyexample.com/). SpecFlow is good for this in combination with Selenium (Coypu looks like a nice abstraction to put above Selenium).

Coypu looks cool thanks - didn't know about it!

AndyM
  • 3,574
  • 6
  • 39
  • 45
0

With regards to your first bullet point, Coypu is an excellent web driver abstraction which makes it easy to switch between different web drivers. I've been using it to great effect in a corporate environment.

It's also fairly trivial to configure it to use the PhantomJS headless webkit browser. See this link for how to do so.

Also a C# library I have found invaluable for unit testing is Fluent Assertions. Its fluent style nicely complements technology agnostic BDD tests.

Ben Smith
  • 19,589
  • 6
  • 65
  • 93