opencover


How OpenCoverage coverage works - are classes without any tests counted?


I think I have a basic misunderstanding of the way OpenCover (or coverage in general) is working.
I think that classes without any tests are not counted in the coverage, which is very strange.
for example, if I have two classes (lets say of the same number of lines) and one is fully covered while the other has NO UT written, I expect to get 50% coverage, but I believe that I am getting 100%.
This doesn't make sense to me.
So I have 2-3 questions:
Should I expect classes without any UT to be counted in the coverage %?
If so, how can I troubleshoot my issue? (should I look for something in the report? what exactly? is it possible that OpenCover ignores those classes for another reason?)
If not, how does this make sense? if I start adding UT to a legacy project, the coverage will drop every time I add UT to a class that did not have one until now. there must be something that I am missing if this is the case.
Thank you for you help,
Roy.
I suspect the assembly is not loaded and so it (and all the classes within it) are not seen by OpenCover.
Simplest way is to add tests for at least one type in each assembly you wish to get coverage for.

Related Links

OpenCover & ReportGenerator : History files are empty
Exec command failing on some PCs in psake script to OpenCover
OpenCover how to exclude tests with certain Category
OpenCover coverage for NUnit test
Cyclomatic Complexity in openCover and Visual Studio
OpenCover filter not yielding any results
How OpenCoverage coverage works - are classes without any tests counted?
Coverage report using opencover
OpenCover - cannot find PDB

Categories

HOME
pandas
osgi
mfc
relative-path
view
electron
jsrender
callback
baqend
azure-media-services
indesign
basic
session-variables
rascal
modx-revolution
circular-dependency
size
visual-studio-cordova
caml
oracle-coherence
code-review
visual-composer
zapier
kudan
emgucv
android-widget
smb
opennlp
tdd
react-css-modules
uninstall
filezilla
publish
elasticsearch-net
wtx
msys2
atlassian-crucible
skia
sql-server-2012-express
tinymce-4
preg-match
http-status-code-503
xquery-3.0
oracle-fusion-middleware
stringtemplate
azure-sql-database
hockeyapp
objectlistview
service-discovery
code-search-engine
vapor
reportingservices-2005
android-mediaprojection
acoustics
sas-jmp
menuitem
jquery-nestable
typescript1.8
pebble-watch
fancybox-2
nstextview
snmptrapd
python-cryptography
quartz-composer
jquery-filter
google-feed-api
paypal-express
autorest
clang-static-analyzer
lttng
actionbardrawertoggle
hover-over
nessus
rhino-servicebus
independentsoft
pyke
photobucket
xna-4.0
retina
vstest.console.exe
unity3d-gui
sonarqube5.1.2
e10s
jsapi
npapi
operator-precedence
xc16
mdt
android-radiobutton
article
ms-project-server-2010
coverflow
cos
orchardcms-1.7
selected
typoscript2
gwt-ext
blackberry-playbook
yslow
subviews
h.323
fixed-width
brewmp
memory-size
exchange-server-2003
boost-smart-ptr
procedural-music
defensive-programming
uiq3

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App