axodox / AxoCover

Nice and free .Net code coverage support for Visual Studio with OpenCover.
https://marketplace.visualstudio.com/items?itemName=axodox1.AxoCover
MIT License
248 stars 60 forks source link

TestCase tests in a base class not discovered #173

Open m-tapper opened 6 years ago

m-tapper commented 6 years ago

Using NUnit3 framework, if you have a base class with [TestCase] tests AxoCover doesn't discover them but normal [Test] tests are discovered.

For each test not discovered I get the following exception in the AxoCover output:

Could not register test case ImageSelector.Ui.ViewModels.Tests.ImageSelectorViewModelTests`1.CanExecuteCopyImageCommandTest(ReferenceImage.Service.Ui.ViewModels.Tests.ReferenceImageListViewModelTests.CanExecuteCopyImageCommandTest(False,False))|1027. Reason: SerializableException: Value cannot be null.
Parameter name: parent
   at AxoCover.Models.Testing.Data.CodeItem`1..ctor(T parent, String name, CodeItemKind kind) in C:\projects\axotools\AxoCover\Models\Testing\Data\CodeItem.cs:line 26
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 256
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 246
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 246
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 246
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 246
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 239
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 243
   at AxoCover.Models.Testing.Discovery.TestProvider.AddTestItem(Dictionary`2 items, CodeItemKind itemKind, String itemPath, TestCase testCase, String displayName, String testAdapterName) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 230
   at AxoCover.Models.Testing.Discovery.TestProvider.LoadTests(TestProject testProject, TestCase[] testCases) in C:\projects\axotools\AxoCover\Models\Testing\Discovery\TestProvider.cs:line 209