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

Low test coverage! #32

Open
amihaiemil opened this issue May 14, 2019 · 6 comments
Open

Low test coverage! #32

amihaiemil opened this issue May 14, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@amihaiemil
Copy link

Cause: Test coverage is under 40% (39% at the moment of writing).
Risk: Bugs may be easily introduced
Effect: Users will not be happy

Did I get this right? :)

@yegor256
Copy link
Owner

@amihaiemil perfectly :)

@yegor256 yegor256 added the bug Something isn't working label May 15, 2019
@yegor256
Copy link
Owner

@amihaiemil but it's not true. The reporting is broken. For example: https://codecov.io/gh/yegor256/0rsk/src/master/objects/tasks.rb This page says that tasks.rb is not covered, but we have test_tasks.rb, which covers this class perfectly.

@pnatashap
Copy link
Contributor

Looks like codecov failed:
/home/runner/work/0rsk/0rsk/objects/plans.rb:25: warning: /home/runner/work/0rsk/0rsk/objects/plans.rb:25: warning: loading in progress, circular require considered harmful - /home/runner/work/0rsk/0rsk/objects/tasks.rb from /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:6:in

'
from /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:6:in select' from /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:21:in block in '
from /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:21:in require' from /home/runner/work/0rsk/0rsk/test/test_0rsk.rb:26:in <top (required)>'
from /home/runner/work/0rsk/0rsk/test/test_0rsk.rb:26:in require_relative' from /home/runner/work/0rsk/0rsk/0rsk.rb:299:in <top (required)>'
from /home/runner/work/0rsk/0rsk/0rsk.rb:299:in require_relative' from /home/runner/work/0rsk/0rsk/front/front_tasks.rb:23:in <top (required)>'
from /home/runner/work/0rsk/0rsk/front/front_tasks.rb:23:in require_relative' from /home/runner/work/0rsk/0rsk/objects/tasks.rb:24:in <top (required)>'
from /home/runner/work/0rsk/0rsk/objects/tasks.rb:24:in require_relative' from /home/runner/work/0rsk/0rsk/objects/plans.rb:25:in <top (required)>'
from /home/runner/work/0rsk/0rsk/objects/plans.rb:25:in `require_relative'

Coverage report generated for Unit Tests to /home/runner/work/0rsk/0rsk/coverage/coverage.xml. 291 / 744 LOC (39.11%) covered`

@yegor256
Copy link
Owner

@pnatashap can we fix this?

@pnatashap
Copy link
Contributor

Yes, I fix that error, but in addition codecov report is generated before test run, so no logic is covered and new test does't affect on it. Looking into it, very strange

pnatashap added a commit to pnatashap/0rsk that referenced this issue Feb 4, 2024
@pnatashap
Copy link
Contributor

Some error are fixed in PR, but coverage is still low.
Coverage report generated for Unit Tests to /home/runner/work/0rsk/0rsk/coverage/coverage.xml. 285 / 735 LOC (38.78%) covered Started with run options --seed 63982
The same issue is in 0pdd, but works good in netbout (with similar code). The only diff that I can see - in netbout codecov report is generated after tests run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants