brownfield-team / anacapa-github-linker

A tool for managing students in computer science courses. Deployed at:
https://ucsb-cs-github-linker.herokuapp.com
MIT License
4 stars 6 forks source link

pc - add test coverage calculation to project using simplecov gem #521

Open pconrad opened 2 years ago

pconrad commented 2 years ago

Closes #520

In this PR, we add simplecov, a gem for calculating test coverage for the Rails app.

Coverage is calculated automatically each time we run rake test; there is no need for a separate command.

The test coverage is reported by a message such as this one at the end of the output from rake test:

Coverage report generated for Minitest to /Users/pconrad/github/brownfield-team/anacapa-github-linker/coverage. 1715 / 2397 LOC (71.55%) covered.

You can also open the file ./coverage/index.html in a web browser to see a more detailed report, e.g.

image

Drilling into a file shows the details of lines covered or not covered using colors:

image
codecov-commenter commented 2 years ago

Codecov Report

Merging #521 (0ba283b) into master (51393bb) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #521   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           68        68           
  Branches         4         4           
=========================================
  Hits            68        68           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 51393bb...0ba283b. Read the comment docs.