New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverlet throws BadImageFormatException #1612
Comments
Please read the documentation and use the proposed parameters.
|
I think you are doing everything correct as described here for e-2-e tests. But I must admit I haven't used coverlet for integration tests in years. |
I did more investigation and understood that BadImageFormatException is not an issue. most probably it is caused by an error also it takes by default candidate libraries which is not mentioned anywhere |
@daveMueller thanks for your response. |
The link I posted has nothing to do with normal unit tests (Code Coverage for integration tests and end-to-end tests). I can remember that I have done this at least once for e-2-e tests with Selenium. If you can provide a simple repro with the tools you are using, I could give it a try myself. |
I don't have repro, I am using Autodesk Revit.exe as a target. so here is the scenario
I can run the revit.exe with coverlet console command but it fails to collect the coverage. |
OK I see, nothing I can reproduce by myself. Can you post a detailed output here? Maybe we can find some hints there. Just set the verbosity level to detailed. (troubleshoot) |
This the log of e-2-e tests
This is normal unit tests
what ever action is done on revit.exe it doesn't collect code coverage |
Sorry can't really identify what the problem is. Like you already mentioned, this looks a bit suspicious.
As also mentioned in the documentation, coverlet is currently a bit limited for e-2-e tests and relies on a graceful Any other ideas @Bertk @MarcoRossignoli? |
@daveMueller I never tried to generate source code coverage metrics for e2e tests. We used a test concept which defined a test pyramid and source code coverage was mandatory for unit test and unit integration tests. |
Castle.Core.dll might be causing your problem. |
Hi,
I am trying to run Coverlet but it throws the following error for every dll
BadImageFormatException during MetadataReaderProvider.FromPortablePdbStream in InstrumentationHelper.PortablePdbHasLocalSource, unable to check if the module has got local source.
I have sets of e-2-e tests that can be run only through executable application.
here is the command I am following
coverlet D:\d\Source\myProject\bin\Debug --target "C:\Program Files\myProject.exe" --output "D:\coverlet.xml" --format opencover
I can open exe and run tests but I am not getting any code coverage.
Any Idea how to fix this issue?
I m using coverlet.console on .net framework project
The text was updated successfully, but these errors were encountered: