Support for code coverage for ASP.NET 5 projects. #327
Comments
Thanks, what version of OpenCover are you using? The latest release can be found here https://github.com/OpenCover/opencover/releases if you need it. In the meantime what does it say in the XML about where it loaded the assembly from and why it didn't instrument it? |
I too have the same problem. |
I am also having the same problem, using dnx-clr-win-x86.1.0.0-beta6. |
the original OP did not respond to my query so I have not pushed on the support |
Thanks for your suggestion. |
Sorry I don't, what you could try is using the full path to the targetdirectory. |
It tried the latest version. opencover.4.6.192.msi, XML says skippedDueTo="MissingPdb". |
I think I got it figured out. Specify the --lib argument with the dnx command that targets the folder containing the PDB of the assembly being covered. For instance here is my command: OpenCover.Console.exe -target:C:\users\jbruun.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe -targetargs:"--lib c:\projects\cpip\src\website\bin\debug\dnx451 c:\projects\cpip\te |
@Cobster |
It is working for me, but the results include XUnit assemblies as well. If I include filter option the report is not getting generated. |
@Cobster thanks - I'll add it to the wiki and documentation |
@sawilde - Your welcome, glad this could get figured out without requiring new bits. |
Yes. I have the DLL and PDB. But I didn't understand why filter option is not working. If I apply |
@anuraj - Not sure if its case sensitive, but if it is the XU in XUnit should be lowercase to match the assembly name. Are you adding the asterisk wildcard after [xunit] so it will filter the types? I've had better luck using the inclusion filter to specify my own assemblies. |
@anuraj add as @Cobster mentions the inclusive way is much easier and you are much more in control e.g.
which you include all the assemblies beginning with MyCompanyName but exclude any that have Tests at the end. All of this is in the wiki usage guide |
Added wiki entry https://github.com/OpenCover/opencover/wiki/DNX-Support |
When the code reads the value from configuration file such as scenarios like reading connection string from database, then it always throws null exception and all test methods are fail. |
@sgopimca7 Please open a new issue with a repeatable scenario |
i am facing similar issue where for my project .net framework 4.6.2 hosted in iis ,i am unable to generate xml file for my project. |
Support for code coverage for ASP.NET 5 projects.
We can run the test in ASP.NET 5 using
dnx . test
command, where . is the current directory, where we require the project.json file. So I am the command like this.You can find the source code and test project - https://github.com/anuraj/ASPNET5CIDemo
If you want to configure DNX, please check the appveyor.yml or .travis.yml
The text was updated successfully, but these errors were encountered: