Welcome to Typemock Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!

Typemock - Unit test missing and wrong code coverage result

0 votes
Hi,

I normally use Resharper test runner to run unit test which shows that I have around 500 test for "ClassA" in "Test_ClassA"

However, when I go to TypeMock -> Run - > All Test, it shows that there's only 163 tests.

Plus, when I go to TypeMock -> Coverage -> Solution.

The "ClassA" didn't even show in the list. It display Test_ClassA instead with empty coverage values.

 

May I ask if you have any idea about what's going on ?

 

Thanks

Maverick
asked Feb 23, 2016 by cscmh99 (340 points)

1 Answer

0 votes
 

The coverage is reported only for tests that ran with Typemock SmartRunner so this actually makes sence.

Which test framework do you use for Test_ClassA?

 

Alex Galin | Support Team

answered Feb 23, 2016 by alex (17,910 points)
I'm using nunit WITH typemock for Test_ClassA

May i know why the coverage report makes sense to you ?

I'm talking about the Coverage report include ALL libraries in the list EXCEPT the library i'm testing. Is there any misunderstanding here ?

Is it Nunit 3?

If not, try the following:

  1. Close the solution in VS.
  2. Find <SolutionName>.IsolatorCache.user file near your <SolutionName>.sln and delete it.
  3. Reopen VS.

 

The coverage reprots are generated when you run tests with Typemock Runner.

If the runner doesn't see some tests than the code that these tests cover is absent from the solution coverage,

Making the runner identify all your test should fix the coverage as well.

 

Alex Galin | Support Team

I guess the first problem would be the problem of TypeMock runner FAILED to identify all my test.

I didn't do too much test.

But, seeems like a combination of a "private static method" followed with a test case using [TestCase(param1, param2, param2)] will make ALL subsequence unit test disappear for TypeMock runner. Is that a known issue ?
...