Update: Now this is a project for integrating MSpec into the VS2012 test system. It is available in the Visual Studio Gallery and the source is on GitHub .
After starting debugging problems with both sources of the project, there seem to be two main problems causing incompatibility between MSpec and the Gallio VS runner. However, both problems are related to the fact that the VS runner uses Cecil to load type information from assemblies (presumably to avoid loading the test assembly into the main VS AppDomain).
I will update this answer while I open more (I hope that one or more fixes fix the problems).
Problem 1: Nested types are ignored
I used nested types for my tests ( SubjectSpec+when_something
), which are ignored by the Cecil-based reflection used by the Gallio VS runner to avoid loading the test assembly into the application domain.
This turned out to be a fairly simple fix that I introduced as a patch to the Gallio developers. I will update this answer if / when I receive confirmation of which release it will be part of.
Problem 2: MSpec throws "An exception occurred while calling the test driver"
If the container type is removed to avoid problem 1, MSpec throws this error. The reason for this is that MSpec is trying to instantiate a test object, but Gallio provides only a Type
wrapper object that cannot actually be created.
source share