What combination of BDD and mocking frameworks will work with the Team Build gated check-in?

I am trying to implement BDD / TDD in my team as easily as possible. Team Team closed registration only supports MSTest, and Microsoft Pex and Moles work together very well. For BDD, I'm most impressed with MSpec and the MSMSpec T4 template will convert these tests to MSTest, but MSpec and Moles can't seem to work together. (See Is there a workaround for setting [HostType ("Moles")) when working with anonymous methods in MSpec? )

So:

  • MSTest is great for unit tests and works with Team Build, but not great for BDD.
  • Other mocking frameworks work with both MSpec and MSTest, but Moles is pushing to Microsoft.Fakes with VS 11, and does what I don't think is possible with other frameworks.
  • Close placeholders I found for MSPec such as NSpec only generate NUnit tests, not MSTest.

Which combination of tools works together?

Update: SpecFlow won't work with Moles as the TestMethods are in the generated code and I don't see a way to change the code generator to include the required HostType attribute. Then try StoryQ.

Update 2: Turns out it's not very difficult to extend SpecFlow to work with Moles, so I'm going with that for now, but I'd still be interested to hear the input.

+3


source to share


1 answer


Have you tried MSMSpec ?



MSMSpec is a T4 based tool that can generate MSTest code to extend MSpec (Machine.Specifications) tests so that they can run under any version of MSTest.

0


source







All Articles