Extending Visual Studio: Good Test Coverage Is Possible

A World of Pain?

It's not quite uncommon to see developers despair when doing Visual Studio Extensibility (VSX) work. In addition to a myriad new APIs to learn (which can be pretty intimidating), it seems up-front so alien to the typical development work you do: you have to plug into someone else's environment, you have to learn when and why your code will be invoked, but worst of all, there's no plug-in architecture per-se.

Unlike other frameworks that implement certain patterns (i.e. ASP.NET MVC, WPF MVVM) or "plain" apps/services where you decide more or less up-front what pattern you'll apply (DDD, Active Record, SOA, etc.), doing VSX feels more like doing transaction scripts over the VS APIs: hook to an event or implement a callback, and when called, go off do your thing and be done. And more often than not, cleaning up the mess is done by trying to apply DRY (dont repeat yourself) by moving repeated code over to all sorts of helpers or extension methods. I'm as gilty as anyone of having created yet another DteHelper.cs in the past....

Read full article

No Comments