0

Howto test a plugin daemon

Hi, I am developing a plug-in, that provide some metrics over the unit-tests. For now it will be a daemon that just highlifhts the tests.  I have assembly with plugin and assebmly with tests(ReSharperTestEnvironmentAssembly in AssemblyInfo). I try to create tests as it suggested in http://confluence.jetbrains.com/display/NETCOM/2.10+Testing+(R8). But this way is not relevant. This code is not working:

private bool IsNunitTestDeclaration(IMethod method)
{
      if (method == null)
      {
             return false;
      }

      return method.HasAttributeInstance(new ClrTypeName("NUnit.Framework.TestAttribute"), false)
             || method.HasAttributeInstance(new ClrTypeName("NUnit.Framework.TestCaseAttribute"), false); }

So I can debug my plugin in other instance of Visual Studio(slowly and inefficient), but I can not test it. I plan to separate plug-in logic that works with unit-test, and use in other ways. So the question is: how i can test the class that accepts the IMethodDeclaration of unit-test and provides metrics snapshot? Can I provide examples of unit tests in my  tests assembly and process it in plug-in tests(howto)? Are there other ways?

8 comments

Please sign in to leave a comment.