How to enable mighty moose (continuoustests) in visual studio 2013?
Asked Answered
W

3

23

The question pretty much tells it all.

Continoustests comes as a windows installer (http://continuoustests.com/download.html), so the trick described here doesn't work.

Worrywart answered 7/12, 2013 at 15:54 Comment(0)
C
30

I tried the following:

  1. Install Mighty Moose
  2. copy the C:\Program Files (x86)\ContinuousTests\AutoTest.VS.2012.Addin to C:\Program Files (x86)\ContinuousTests\AutoTest.VS.2013.Addin
  3. Edit the 2013 file and update the version numbers from 11.0 to 12.0
  4. Alternatively: drop the following file: AutoTest.VS.2013.Addin in your MightyMoose installation folder.
  5. In Visual Studio open the Tools - Options - Environment - Add-in Security page and add C:\Program Files (x86)\ContinuousTests to the list of trusted add-in paths.
  6. Restart Visual Studio

This seems to do the trick for me. Not sure if there are any issues with this, as I haven't played around with it too much. I had Visual Studio 2010, 2012 and 2013 installed side-by-side, so I didn't have to trick the installer into believing that there is a suitable version of Visual Studio anywhere.

Then

Follow the steps in the next answer below :)

Chaco answered 7/12, 2013 at 16:24 Comment(3)
Only thing is, the code coverage part doesn't work. Has anyone been able to figure that one out?Charolettecharon
I got the code coverage margin to work. See my posted answer below. I in no way intend to detract from @jessehouwing`s answer, as it is a correct answer (just not the whole answer). Thanks again @Chaco for posting your answer.Charolettecharon
To get this to work with no previous version of vs installed you need to copy the file Microsoft.Build.Tasks.v12.0.dll from C:\Program Files (x86)\MSBuild\12.0\Bin to C:\Windows\Microsoft.NET\Framework\v4.0.30319Copyright
C
17

@jessehouwing's answer is on the mark! But, there's one problem left unresolved: the code coverage margin of Mighty Moose still won't appear. So, in addition to following @jessehouwing's suggestion above, you must also do the following in order for the code coverage margin and the various test call graph overlays to work.

  1. Go to the Visual Studio 2013 installation folder. By default, this is %ProgramFilesx86%\Microsoft Visual Studio 12.0.
  2. Within that folder, navigate to \Common7\IDE\Extensions.
  3. Create a new folder called Continuous Tests (yes, it does have a space in its name).
  4. Choose one of two paths below:
    1. If you have a previous version of Visual Studio installed:
      1. Navigate to %ProgramFilesx86\Microsoft Visual Studio x.0\Common7\IDE\Extensions\Continuous Tests, where x.0 is the previous version of Visual Studio, e.g. 2008 - 2012.
      2. Copy the extension.vsixmanifest file from the current directory to the directory created in step 3 above.
    2. If you don't have a previous version of Visual Studio installed:
      1. Go to the installation directory for Mighty Moose, by default %ProgramFilesx86%\ContinuousTests, and copy the extension.vsixmanifest file to the directory created in step 3 above.
  5. Start notepad as an administrator.
  6. Open the copied extension.vsixmanifest file.
  7. Add the text indicate below into the extension.vsixmanifest file after the included text shown (you don't need to add the comment), and save the file:

    <SupportedProducts>
        <VisualStudio Version="11.0">
            <Edition>Ultimate</Edition>
            <Edition>Premium</Edition>
            <Edition>Pro</Edition>
        </VisualStudio>
        <!-- ADD THE TEXT BELOW TO ENABLE VISUAL STUDIO 2013 SUPPORT -->
        <VisualStudio Version="12.0">
            <Edition>Ultimate</Edition>
            <Edition>Premium</Edition>
            <Edition>Pro</Edition>
        </VisualStudio>
    </SupportedProducts>
    
  8. If you copied the extension.vsixmanifest file from the Extensions directory of a previous version of Visual Studio, you are finished. Otherwise, continue on to step 9.
  9. Find the following text within the extension.vsixmanifest file:

    <Content>
        <MefComponent>|%CurrentProject%|</MefComponent>
    </Content>
    
  10. Change |%CurrentProject%| to the following:

    %Mighty_Moose_Install_Path%\AutoTest.VS.RiskClassifier.dll
    

    where %Mighty_Moose_Install_Path%, by default, is %ProgramFilesx86%\ContinuousTests. (Use the actual path, not the expansion macro!)

  11. Save the file.
  12. If you have Visual Studio 2013 open, restart Visual Studio for the changes to take effect. If you want to verify that the extension is installed, go to Tools|Extension and Updates... and search for Mighty Moose in the list of extensions.

Hope that helps save someone a few hours worth of time trying to figure this out.

Charolettecharon answered 5/2, 2014 at 16:57 Comment(14)
Nice addition! This completes it.Chaco
Thanks everybody. Quick question, though, is it Continous or Continuous? I just wanted to make sure that it wasn't some glitch spelling that Mighty Moose needed.Quintilla
@Charolettecharon did you encounter the test runners not found warnings? Would you let me know how to resolve them? Thanks!Beggar
@RichardO'Neil It should be Continuous--it's easy to miss that 'u' in there ;). I've updated my answer with the correction. Thanks for pointing that out.Charolettecharon
@CandyChiu As far as test runners are concerned, here's what I found. The documentation for Mighty Moose is very sparse (I should say non-existent, but there are videos that are quite helpful for a feature overview). I have Mighty Moose working on VS 2010, 2012 and 2013 using MSTest Runner. According to this blog post, Mighty Moose also supports NUnit, xUnit and the MBUnit test runners. I tried using SpecFlow with MSTest Runner in conjunction w/ MM, but it really didn't work well.Charolettecharon
Here's a blog article about getting Mighty Moose to work with SpecFlow and NUnit with Mono.Net on Ubuntu: http://blog.perbrage.com/2012/04/19/using-mighty-moose-with-specflownunit-on-mono-net4-ubuntu/.Charolettecharon
This seems to be broken in Visual Studio 2013 update 2 (or at least when you have CodeAlike installed). It crashes the Editor Package, making Visual Studio unusable :(Chaco
Well, since Update 2 is only in CTP, I refuse to install it because, though it's mostly stable, it is only "preview". Things may change; it's not unheard of that even minor changes between CTP and RTM resolve issues that broke during the CTP period. I would suggest trying again when Update 2 is RTM'd.Charolettecharon
I cannot get the extension to work at all. I'm on vs2013 update 1. Its on a fresh win 8.1 x64 machine with no previous versions of vs installedCopyright
@Copyright All I can say is make sure you followed all of the instructions correctly. I, too, am running on Win 8.1 x64 with VS 2013 Update 1. The main difference, though, is that I do have VS2010 and VS2012 installed--and that may be the clincher.Charolettecharon
I've tried it and double checked paths etc several times. I do suspect its still using something in vs2012. Any chance you could post a full working extension.vsixmanifest?Copyright
I think what you're finding, unfortunately, is that without an official "supported" version of Visual Studio installed (e.g. 2010, 2012), the installer is not installing the necessary components. :( The "workarounds" in the accepted answer and my answer are for enabling the installed components to also work in VS2013. I would suggest that you contact the project owners on Github--I know there's a waiting pull request that adds support for Visual Studio 2013. I'm sorry I can't be more helpful. The final alternative is to install VS 2012, install MM, and try these instructions again.Charolettecharon
I have VS 2013 update 2 and I managed to get the menu item in it only after I installed the VS 2012 on my machine and reinstalled the MM. However, the instruction for getting the extension did not work for me.Vegetarian
Same as above. I'm on VS 2013 Update 4 and I get a message saying the AddIn failed. This is unfortunate. I'd like to try this out.Gaffer
C
9

If you are installing on a fresh machine with no previous versions of visual studio installed there are a few extra steps to get it working. Here are the full steps:

  1. Follow the answer from @jessehouwing
  2. Put msbuild in the 2012 location by copying the file Microsoft.Build.Tasks.v12.0.dll from C:\Program Files (x86)\MSBuild\12.0\Bin to C:\Windows\Microsoft.NET\Framework\v4.0.30319
  3. Follow the answer from @fourpastmidnight
  4. Reboot
  5. Install another visual studio extension of your choice from "Extensions and Updates" inside visual studio 2013 (I tested with Code Maid but I suspect any extension will provide the required kick)
  6. Restart Visual Studio. Mighty Moose wakes up and the code coverage icons appear.
  7. It is now safe to uninstall the extension you added in step 5 if you don't want it.
Copyright answered 17/4, 2014 at 14:35 Comment(2)
Glad you found a way to get this to work on a fresh install with no other VS versions installed!!Charolettecharon
@Teomanshipahi - I know!!! I really wanted to get the extension working I tried everything :-)Copyright

© 2022 - 2024 — McMap. All rights reserved.