Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch.exe "Code members in new coverage for test "
GreenMoose
#1 Posted : Friday, December 7, 2018 10:33:39 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 415

Thanks: 97 times
Was thanked: 44 time(s) in 43 post(s)
[NCrunch Console Tool v3.22.0.1]

Today when running with a non existent NCrunch cache (1 local and 2 grid nodes active, node2 is pretty and limited to 1 test task) on TeamCity, NCrunch reported errors "Code members in new coverage for test":
BuildProblems

Example of stack trace from build log:
Code:

[11:03:32] :     [Step 14/20] [Core-50] Grid node node2.domain reports task completed: [LocalTestExecutionTask: [SnapshotComponent: Solution.Web.NonHttpIntegrationTests.NUnitTests, 32, 34492078], 8 test(s), NUnit, ProcessingSucceeded, ALGOL2, 62ab1cd6-a6ad-4226-86c7-b85f569d520b]
[11:03:32] :     [Step 14/20] [Core-50] ERROR (Internal): nCrunch.Client.Model.CodeCoverage.CoverageMappingException: Code members in new coverage for test Solution.Web.NonHttpIntegrationTests.NUnitTests.OrderToolControllerIntegrationFixtures.SaveOrderItemFixture.OrderItemValueValidationFixture+RegexValidationFixture.IfValueStartsOrEndsWithWhitespaceItShouldBeTrimmedBeforeValidating(True," abc123 ") are reported out of order (Models\WebControls\DataFieldValueModel.cs:Presentation\Solution.Web\Solution.Web.csproj should be later than Models\ViewTemplateOptions\TextTabularForm2Options.cs:Presentation\Solution.Web\Solution.Web.csproj)
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.Indexes.CoverageIndex`1. (ModelTest , ModelCodeMember , Int32 , ModelCodeMember , Int32 )
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.Indexes.CoverageIndex`1.MergeNewLineCoverageDataIntoIndexReturningChangedCodeMembers(ModelTest test, ComponentUniqueName componentUniqueName, ICoveragePointIterator`1 newCoveragePoints)
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.CoverageDatabase.MergeNewLineCoverageDataIntoDatabaseReturningChangedCodeMembers(ModelTest test, ComponentUniqueName componentUniqueName, ICoveragePointIterator`1 newCoveragePoints)
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.CodeCoverageMerger. (ModelTest , Int64[] , ComponentMappingData , AssemblyClassMethodData , Dictionary`2 , IDictionary`2 , ComponentUniqueName )
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.CodeCoverageMerger. (ModelComponent , ComponentMappingData , ComponentTestExecutionMap , AssemblyClassMethodData , IDictionary`2 , HashSet`1 )
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.CodeCoverageMerger.MergeAndApplyCoverageResultsFromTestOutput(IEnumerable`1 componentsInTestDomain, HashSet`1 testsToMerge, ComponentTestExecutionMap[] componentTestExecutionMaps, IDictionary`2 mappingDataByComponentId, IDictionary`2 compiledFileVersionsById, IDictionary`2 assemblyClassMethodDataByComponent)
[11:03:32] :     [Step 14/20] [Core-50] at nCrunch.Client.Model.CodeCoverage.CodeCoverageMerger. (TestExecutionCompletedEvent )

Remco
#2 Posted : Friday, December 7, 2018 11:22:19 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,484

Thanks: 718 times
Was thanked: 899 time(s) in 855 post(s)
This error is the result of an internal consistency check performed when merging code coverage results into NCrunch's coverage database. The check basically verifies that the sequence of source files in the code coverage result is consistent with the sequence of source files in the build output.

I have never once seen this check fail before. The only thing I can think of that might cause it to fail is if somehow one of the binaries being used in your test environment is inconsistent with the rest of the session, i.e. perhaps you have an old binary from a previous session that has somehow been preserved and roped into the test environment. If you're able to reproduce this problem in a way that you can share with me, I should be able to dig deeper and figure out what is happening.
1 user thanked Remco for this useful post.
GreenMoose on 12/10/2018(UTC)
GreenMoose
#3 Posted : Tuesday, December 18, 2018 9:06:49 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 415

Thanks: 97 times
Was thanked: 44 time(s) in 43 post(s)
It is happening quite often on my CI build (with a large solution unfortunately) which is quite annoying because the build might take 30minutes and then fail due to this error and have to be re-executed without NCrunch cache (re-executing all tests), can I send create some NCrunch verbose output logs or whatever to help troubleshooting it?
Remco
#4 Posted : Tuesday, December 18, 2018 11:51:39 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,484

Thanks: 718 times
Was thanked: 899 time(s) in 855 post(s)
Sorry to hear this. I'll try to do some analysis to narrow this down a bit. I'll let you know about the diagnostic build.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.028 seconds.