Skip to content
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

Estimation of code coverage #20

Closed
dschlaep opened this issue Jun 26, 2017 · 6 comments
Closed

Estimation of code coverage #20

dschlaep opened this issue Jun 26, 2017 · 6 comments

Comments

@dschlaep
Copy link
Member

  • estimate code coverage of unit tests
  • report this estimate
@dschlaep dschlaep added this to the Code testing milestone Jun 26, 2017
@Zachary-Kramer
Copy link
Contributor

Most IDEs will report how much of the code is covered. Most notably, non-enterprise editions of Visual Studio use a plug-in OpenCover to do so.

@dschlaep
Copy link
Member Author

OpenCover is Microsoft and seems a "code coverage tool [only] for .NET 2 and above (Windows OSs only - no MONO)".

I would favor a solution that would integrate well with a CI. What do you think about using coveralls? I set it up for our rSOILWAT2 repository badge - via travis CI. They appear to integrate with c/c++ github repositories and travis.

@dschlaep
Copy link
Member Author

I am just realizing that the OpenCover repository is using coveralls for themselves as well!

@Zachary-Kramer
Copy link
Contributor

Coveralls looks like a nice tool and appears to integrate well with GitHub. I don't see any better option.

I noticed that for rSOILWAT2, code coverage takes into account the src folder. Do we want this? As a side note, when you click a file within src, coveralls cannot find the file.

@dschlaep
Copy link
Member Author

I noticed that for rSOILWAT2, code coverage takes into account the src folder. Do we want this? As a side note, when you click a file within src, coveralls cannot find the file.

I opened an issue for that in rSOILWAT2.

However, it is to be expected that https://coveralls.io cannot find the source files from SOILWAT2 within the src/ folder in the rSOILWAT2 repository. This is because SOILWAT2 is only a submodule in rSOILWAT2. No?

@Zachary-Kramer
Copy link
Contributor

Yes I assume it's because of the submodule, though GitHub can access submodule files just fine, so it's probably just coveralls not being able to access the SOILWAT2 repo (or a lack of submodule support).

@dschlaep dschlaep self-assigned this Nov 28, 2017
dschlaep added a commit that referenced this issue Nov 29, 2017
- close #20

- makefile gained targets to estimate code coverage
* 'make cov' = same as 'make test' but with code coverage support
* 'make cov_run' = run unit tests and gcov on each source file (which
were in a previous step compiled with 'make cov')

- new bash script 'run_gcov.sh' which executes 'gcov' for each source
file; used by 'make cov_run'

- updated travis-ci yml to run code coverage unit tests and connect to
'codecov' server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants