Comments (5)
And formally in release 3.5.580
from altcover.
I have a what looks like repro for this (my current development system, and ReportGenerator 3.1.2)
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Palmmedia.ReportGenerator.Parser.OpenCoverParser.<>c.<ProcessClass>b__13_5(XElement m)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Palmmedia.ReportGenerator.Parser.OpenCoverParser.ProcessClass(Dictionary`2 fileIdsByFilename, Assembly assembly, String className)
...
In the generated coverage report, a filtered method looks like
<Method skippedDueTo="Filter" visited="false" cyclomaticComplexity="1" nPathComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="true" isGetter="false" isSetter="false" crapScore="0">
<Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="0" minCyclomaticComplexity="0" visitedClasses="0" numClasses="0" visitedMethods="0" numMethods="0" minCrapScore="0" maxCrapScore="0" />
<MetadataToken>100663299</MetadataToken>
<Name>System.Void N.DU::testMakeUnion()</Name>
<FileRef />
<SequencePoints />
<BranchPoints />
<MethodPoint />
</Method>
Editing the report file to remove the empty FileRef
tag and re-running the report generation worked OK.
tl;dr it's a Postel's Principle fail. I'm not emitting conservatively enough.
from altcover.
I'm currently expecting that the <FileRef />
element contains an uid
attribute. Can you supply this even if the method is filtered?
from altcover.
It's actually simpler for me to omit the tag entirely for methods that aren't being instrumented, and the ReportGenerator seems happy enough with that, too.
from altcover.
Pre-release build available for testing -- otherwise it'll be in the next release
from altcover.
Related Issues (20)
- `dotnet test /p:AltCover=true /p:AltCoverInPlace=true` results in System.IO.IOException: The process cannot access the file 'C:\src\testprj\bin\Debug\net8.0\AltCover.Recorder.g.dll' because it is being used by another process. HOT 5
- help with getting started HOT 2
- Path.GetFullPath no longer resolves long file paths HOT 7
- Could not find coverage.xml.zip when running Instrumented binaries HOT 5
- Adding AltCover to projects results in dotnet test running against all projects in solution HOT 6
- Running AltCover Runner in parallel mode HOT 2
- Question about cyclomatic complexity for pattern match HOT 2
- Changes so AltCover will run when FIPS compliance is required HOT 13
- .../Temp/tmp###.altcover.runsettings not found Intermittent tests ignored. HOT 2
- BranchPoints differ between .NET Framework and .NET 7 when using interpolated strings HOT 5
- Question Regarding assemblies being added to code coverage result HOT 2
- Command vstest.console.exe not started. Why? HOT 3
- altcover runner --OutputFile gives incorrect summary output HOT 8
- ERROR *** Instrumentation phase failed - Failed to resolve assembly: System.Data.Common HOT 8
- Generic methods share the same name and signature HOT 5
- Collection phase failed with an Error HOT 9
- Per-test level code coverage HOT 2
- Coverage collection requires instrumented code in same location until collection is not completed causing service downtime HOT 4
- Question : Codecov says braces are not covered HOT 2
- test run duration degredation when upgrading from 8.8.74 to 8.8.165? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from altcover.