question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show coverage summary on terminal

See original GitHub issue

Today at the end of the tests msbuil/.net tool drivers show a table with coverage result on console. For instance:

Calculating coverage result...
  Generating report '/home/vsts/work/1/s/test/coverlet.core.tests/coverage.opencover.xml'

+------------------------------------+--------+--------+--------+
| Module                             | Line   | Branch | Method |
+------------------------------------+--------+--------+--------+
| coverlet.tests.projectsample.empty | 0%     | 100%   | 0%     |
+------------------------------------+--------+--------+--------+
| coverlet.msbuild.tasks             | 0%     | 0%     | 0%     |
+------------------------------------+--------+--------+--------+
| coverlet.core                      | 83.65% | 78.2%  | 84.07% |
+------------------------------------+--------+--------+--------+

+---------+--------+--------+--------+
|         | Line   | Branch | Method |
+---------+--------+--------+--------+
| Total   | 71.74% | 69.83% | 61.9%  |
+---------+--------+--------+--------+
| Average | 27.88% | 59.4%  | 28.02% |
+---------+--------+--------+--------+

This is not supported at the moment for vstest collectors integration.

cc: @vagisha-nidhi @PureKrome

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:12
  • Comments:11

github_iconTop GitHub Comments

2reactions
patricksadowskicommented, Sep 22, 2020

We use an another approach with the coverlet vstest collector on GitLab. Coverlet is configured to output the results as opencover format. After the test run a script extracts the coverage from the report and prints it to console.

PERCENTAGE=$(grep -m 1 -o -P '(?<=sequenceCoverage=")(\d+.\d+|\d+)' $DIRECTORY/coverage.opencover.xml)
echo "Line coverage: ${PERCENTAGE}%"
1reaction
PureKromecommented, Jan 14, 2020

Thanks @MarcoRossignoli for working on this issue ASAP. this is the biggest blocker for us, using the vstest collector.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command line usage — Coverage.py 7.3.0 documentation
Coverage summary : coverage report​​ For each module executed, the report shows the count of executable statements, the number of those statements missed,...
Read more >
Show coverage summary on terminal · Issue #681
Today at the end of the tests msbuil/.net tool drivers show a table with coverage result on console. For instance: Calculating coverage result.....
Read more >
How to get the code coverage report using Jest?
Navigate to your repo and search for coverage/lcov-report/index.html. Then you can visually see all the coverage areas. enter image description ...
Read more >
Jest code coverage report explained
When looking at the summary table, it can be very hard to determine where you are missing coverage! ... This command will generate...
Read more >
Show Code Coverage on GitLab CI
In this blog post I will show how to display the code coverage number ... to display the coverage text summary which prints...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found