AMA: test automation tooling for MS web stack?

Sean asks…

 Now that you’ve gained experience testing with JavaScript, do you have a preference for tooling? Would you lean more towards JS than Watin for a MS web stack?

BONUS: Any tips on testing modules that rely on dynamically created SQL? Common sense suggests testing to the nearest clearly defined “business value” and eventually separating concerns/refactoring. Any weakly held strong options?

My response…

I still think you should write your tests in the same language as your app, so for a MS web stack I would lean towards SpecFlow/WebDriver (see SpecDriver for an example). I am not sure whether Watin is actively maintained or whether it supports browsers other than IE, but I know the C# WebDriver bindings are increasingly solid.

Using Mocha in JavaScript for e2e tests continues to be painful, we’re patching lots of different aspects of it, which makes me think we would be probably better off using a different tool that does what we want.

Bonus answer: I think your idea makes sense as there’s elements of context and unpredictability, so starting with one approach and letting it evolve over time through refactoring is often the best outcome.

Author: Alister Scott

Alister is an Excellence Wrangler for Automattic.