Resharper BaseTestClass in other project/assembly

83 Views Asked by At

I am unit testing and have a base testclass that include a testmethode that should be inherited by the implementing testclass.

if the base test class is in the same project as the inheriting class the base testmethode is recognized and executed correctly (since resharper 6.1). if the base test class is in a separate assembly, then the test is ignored (resharper test runner).

the ms test runner even does not find the test.

Can someone explain this behaviour or is it kind of a bug?

1

There are 1 best solutions below

0
On

I'm having the same problem in Visual Studio 2012 and ReSharper 8.2 What I did eventually was:

  1. set compile option of the test base class to None.
  2. add the test base class as a link to each project with derived test classes.

Now the test base class is build into the test assembly and it's methods marked with [TestMethod] will be found and executed as well.