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.

AMA: SpecDriver license?

Erick Hagstrom asks…

I just stumbled across SpecDriver. Looks promising, but I don’t see a license file on github. Under what terms is it offered? (I’m hoping that it is free for commercial use. I am investigating options for test automation on behalf of my company.)

My response…

Yes, everything I write on Github publicly is free for any use.

I have added an explicit GPLv3 license to alleviate any licensing concerns.

Aside: I can’t believe it’s been over five years since I created that repo on a whim, it seems to have helped a lot of people and I’ve used that project pattern subsequently many times myself.