Please explain how to setup and use AgUnit.

Nov 27, 2012 at 5:31 AM

There is very little documentation on the site. But I have the Plugin Loaded but R# doesn't run Unit Tests for MS that are referencing a Silverlight 5 Library that I want to test.  I get the message "Test wasn't run".  I have R# 7.1.

Recap of what I have done.

  1. Downloaded you 0.7 build
  2. I have tried this is Visual Studio 2010 and 2012.
  3. The plugin is recognized by R3 7.1 in both VS10 and VS11
  4. I have Silverlight 5 SDK and Tools installed
  5. I create a MSTest Unit Test
  6. I reference the SL5 Lib Project I have
  7. I write a simple test to call a single method,
  8. I get "Test wasn't run"

It would be nice if there was a step by step instructions on what to do with 0.7 exactly where to place it. What other things it depends on that need to be installed. Do we need to copy files or provide the location of these dependencies. Do we create a normal MS Test project or do we have to create a different project type, or make changes to the project.

All this an more would be nice. As it is when it doesn't work we have no idea where to start other than look in this discussion forum, but I didn't see anything that shows "How To..." anything.  I noticed someone have a problem with 0.7 not working but it was because he had a conflict with dotCover which I don't have installed.

So please if you could add some basic documentation for a Quick Start guide or something either here at CodePlex or at GitHub.

Nov 28, 2012 at 9:19 AM

The release notes of 0.7 state that for now it isn't supported in Visual Studio 2010, but it should work in VS2012.

Installation instructions are available on the downloads page.

Is there any chance for supporting VS2010 again in the near future?

Coordinator
Nov 28, 2012 at 10:12 AM
Edited Nov 28, 2012 at 10:14 AM

Problem is, with R# 7.1 they upgraded to .NET 4.5 for the MSTest support in VS2012.

I'll probably have to create a separate build for VS2010 or load the assemblies on demand via reflection.
I'll see what I can do to get that working ...  

As for installation instructions:

For VS2010:

- Install VS
- Install the Silverlight 5 Tools (Includes: SDK+Dev runtime+VS support, SDK by itself is not enough)
- Install R# 7.0
- Install AgUnit 0.6 (or 0.6.1 from GitHub) 

For VS2012:

- Install VS
- Install R# 7.1
- Install AgUnit 0.7

- Create new project: either:

 * With Silverlight Toolkit installed: use the "Silverlight Test project" template
 * Create a regular "Silverlight Application" project and reference "Microsoft.Silverlight.Testing" and "Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight".
 => Those 2 assemblies are included in the Silverlight Toolkit, but we usually don't install it and just check the files in with our project in source control. 

Write your test classes like this:

[TestClass]
public class MyTestClass
{
    [TestMethod]
    public void MyTestMethod()
    {
        Assert.Fail();
    }
}
Nov 28, 2012 at 11:33 AM
Edited Nov 28, 2012 at 11:40 AM

I have created a separate build of the latest AgUnit source against the R# SDK 7.1.96 and ran the build.vs2010.bat.

Output are the AgUnit.Runner.Resharper70.dll and AgUnit.Runner.Resharper70.TaskRunner.dll which I have put in the plugin folder instead of the Resharper71 assemblies. This seems to be working ok, no code needs to be modified, just set the correct references. 

Perhaps you can create a separate download for the AgUnit 0.7 VS2010 plugin. Of course no VS2012 support this way, but it suffices for me.

Coordinator
Nov 28, 2012 at 12:16 PM

I'm going to try to create one assembly for both, it should work when loading the assemblies with reflection.

The other solution is to use the feature of R# that can load different versions of plugins based on the visual studio version.

Coordinator
Nov 8, 2013 at 11:58 AM
This is now available with AgUnit 0.8.
It supports VS2010, VS2012 and VS2013.
Nov 27, 2013 at 5:49 PM
Hi SDeKock,

With VS 2012, R# 8.0.2000.2660 and AgUnit 0.8 is still needed to install the Silverlight 5 tools?

I just installed the plugin but R# is unable to recognize the SL unit tests and the RESHARPER\Uni Tests menu shows disabled and non-text menu items.
Coordinator
Nov 27, 2013 at 8:51 PM
Edited Nov 27, 2013 at 8:52 PM
JoanComasFdz,

If you have installed AgUnit manually or have an older version of it, remove the files.
Then install it by using the 'ReSharper > Extension Manager' menu.

You can verify if AgUnit has been loaded by using the 'ReSharper > Options' menu and then 'Plugins'.
AgUnit should be listed here. If you click 'Show Details' you can see which files are loaded.
Nov 28, 2013 at 6:28 AM
Hi SDeKock,

I did it and it works now, thanks a lot :)