question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to instrument module

See original GitHub issue

I have a Xamarin Forms project which has unit tests written using NUnit targeting .Net Core 3.1. I am unable to get the code coverage generated due to an error/warning. Please find below the logs

/usr/local/bin/dotnet test /Users/runner/work/1/s/App.Test/App.Test.csproj --logger trx --results-directory /Users/runner/work/_temp --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=/Users/runner/work/1/s/TestResults/Coverage/ /p:CopyLocalLockFileAssemblies=true

/Users/runner/.nuget/packages/coverlet.msbuild/2.9.0/build/coverlet.msbuild.targets(31,5): warning : [coverlet] Unable to instrument module: /Users/runner/work/1/s/App.Test/bin/Release/netcoreapp3.1/Xamarin.Forms.Core.dll because : No symbol found for file: /Users/runner/work/1/s/App.Test/bin/Release/netcoreapp3.1/Xamarin.Forms.Core.dll [/Users/runner/work/1/s/App.Test/App.Test.csproj]

Test run for /Users/runner/work/1/s/App.Test/bin/Release/netcoreapp3.1/App.Test.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.7.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
Results File: /Users/runner/work/_temp/_Mac-1606664309627_2020-11-29_15_42_20.trx

Test Run Successful.
Total tests: 15
     Passed: 15
 Total time: 1.4592 Seconds

Calculating coverage result...
  Generating report '/Users/runner/work/1/s/TestResults/Coverage/coverage.cobertura.xml'

+--------+------+--------+--------+
| Module | Line | Branch | Method |
+--------+------+--------+--------+

+---------+------+--------+--------+
|         | Line | Branch | Method |
+---------+------+--------+--------+
| Total   | 100% | 100%   | 100%   |
+---------+------+--------+--------+
| Average | NaN% | NaN%   | NaN%   |
+---------+------+--------+--------+
```

Any help to resolve the issue is highly appreciated. Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13

github_iconTop GitHub Comments

1reaction
hello-ccchencommented, Dec 16, 2020

@MarcoRossignoli I have the same issue for net5.0 as well. 😭

Understand it label as known issue for now, appreciate if any solution.

1reaction
subramaniambcommented, Dec 1, 2020

@MarcoRossignoli : I am kind of stuck with this issue. It would be really helpful if you can take a look at this issue. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coverlet is unable to instrument any modules for my test ...
When running this command (using coverlet underneath): dotnet test /p:CollectCoverage=true .\My.Test.Solution.sln.
Read more >
Developers - [coverlet] Unable to instrument module - NET 5
[coverlet] Unable to instrument module - NET 5 - Microsoft.Extensions.Logging.Abstractions.
Read more >
Customizing Code Coverage Analysis - Visual Studio
If both static and dynamic instrumentation is enabled, Visual Studio tries to instrument your C++ code statically, but if this is not possible...
Read more >
Instrumentation Tests
In summary, an instrumentation test provides a special test execution environment as launched via the am instrument command, where the targeted application ...
Read more >
Wallaby.js Introduction: Troubleshooting
'Failed to instrument filename'. Your compiled code failed to be parsed by Wallaby during the instrumentation phase (which uses acorn ).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found