0

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?

Tobias
  • 2,945
  • 5
  • 41
  • 59
  • Have you tried ReSharper 7.1? Your problem could already be fixed there. – Dmitry Osinovskiy Apr 30 '13 at 12:43
  • @DmitryOsinovskiy: Unfortunatly I cannot test it in 7.1 due to company policies. if you have 7.1, could you create a small testproject? – Tobias Apr 30 '13 at 13:08
  • Well, my colleague who maintains unit testing in ReSharper says that this bug was indeed fixed in 7.0 or 7.1. I'm inclined to trust him, but you can create a test project and send it to our support at http://www.jetbrains.com/support/resharper/ to make them re-test this for you. – Dmitry Osinovskiy May 02 '13 at 10:02

1 Answers1

0

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.

AroglDarthu
  • 1,021
  • 8
  • 17