c# - OpenCover shows 100% coverage with no valid tests -


to visual studio solution 6 projects (class libraries & wcf services) add new test project 1 test, 1 line assert.areequal(1,1). opencover shows 100% coverage (100% sequence , 100% branch).

opencover.console.exe -target:"nunit3-console.exe" "-targetargs:services.nunit" -register:user -skipautoprops -mergebyhash 

only when instantiated class other projects in test coverage dropped 0.1 %.

so looks if dll not loaded, opencover cannot calculate code coverage.

now question if new class library added , never instantiated in unit test, opencover ignore dll while calculating coverage metrics.

this important because have distributed team , developer might create class library , never write tests it. show in code reviews, can opencover configured detect situation.

so looks if dll not loaded, opencover cannot calculate code coverage.

this expected behaviour

now question if new class library added , never instantiated in unit test, opencover ignore dll while calculating coverage metrics.

it doesn't ignore it, runtime doesn't load assembly , opencover not see it.

it show in code reviews, can opencover configured detect situation.

not stands write test tries load every .dll in folder. cause load , opencover see (assuming pdb s available , filters allow etc etc)


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -