GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve test coverage - currently 49.5% in bio-java core · Issue #944 · biojava/biojava

Improve test coverage - currently 49.5% in bio-java core #944

New issue
Copy link
New issue
Copy link
Open
Open
Improve test coverage - currently 49.5% in bio-java core#944
Copy link

Description

@richarda23
richarda23
opened on Jul 23, 2021
Issue body actions

Test coverage is little low - covering more code would enable

  • more confident refactoring. In a code-base with contributions over a long period of time there are cases where new language features can replace existing code in perhaps a more reliable way, but without tests it's sometimes hard to be sure
  • greater confidence in the existing functionality
  • self-documentation of methods
  • identifying obsolete or unused code which could perhaps be scheduled for removal or marked deprecated?

Like covid vaccination rates 100% is unachievable but 50% is a bit on the low side, especially for a library project.
Making sure all public methods are invoked in test code would be a start, and it could be incremental.
I'll attach a PR adding some tests for some utility methods which identified 1 bug to get the ball rolling...

Activity

  1. josemduarte commented on Jul 26, 2021

    @josemduarte
    josemduarte
    on Jul 26, 2021
    Contributor
    More actions

    Thanks @richarda23 . Totally agree, this has been an eternal pending issue for this project. More test coverage is badly needed.

    One curiosity. How did you measure coverage?

    I actually setup SonarCloud for biojava sometime ago (which does coverage too), but I'm not sure if that's accessible to everyone.

  2. richarda23 commented on Jul 30, 2021

    @richarda23
    richarda23
    on Jul 30, 2021
    ContributorAuthor
    More actions

    For this, I just manually ran EclEmma which is an Eclipse plugin (I'm not sure if it's actually maintained any longer), but I expect most tools give similar information.

  3. josemduarte
    added 2 commits that reference this issue on Aug 16, 2021

    Merge pull request #951 from richarda23/crc64checksumtest

    b4d1e90

    Merge pull request #957 from richarda23/core-utils-tests-part2

    3929dd7
  4. richarda23 commented on Nov 17, 2021

    @richarda23
    richarda23
    on Nov 17, 2021
    ContributorAuthor
    More actions

    Latest values are 75% class, 56% method, 58% line - so some improvement. Will try to add more tests to at least touch uncovered non-trivial classes

  5. josemduarte commented on Nov 17, 2021

    @josemduarte
    josemduarte
    on Nov 17, 2021
    Contributor
    More actions

    That's great news. Thanks @richarda23 . FYI I did set up Sonarqube cloud in CI. But I think test coverage reporting is somehow not working.

    Anyway if you are interested the Sonarqube reports are available here: https://sonarcloud.io/organizations/biojava/projects . Let me know if you can't access that and I'll see how to add accounts.

  6. richarda23 commented on Nov 19, 2021

    @richarda23
    richarda23
    on Nov 19, 2021
    ContributorAuthor
    More actions

    Thanks Jose, I can see Sonarqube results fine. I'm tackling some classes now in biojava-core o.b.n.core.sequence package (ChromosomeSequence, ExonSequence etc) as some of these aren't covered by tests.
    I've come across quite a few issues with some of the classes that I would consider bugs, for example:

    • equals and hashcode throwing NullPointer exceptions as some of the properties used by equals() in AbstractSequence aren't set
    • calculation of intron sequences on negative strands returns unexpected results in GeneSequence
    • collections of subelements aren't encapsulated
      What would you advise? I can raise a PR with the tests I've written, with those failing ones marked @disabled for discussion, or raise what I think are issues.
  7. josemduarte commented on Nov 19, 2021

    @josemduarte
    josemduarte
    on Nov 19, 2021
    Contributor
    More actions

    That sounds like a good plan @richarda23 . Let's start a discussion based on a PR.

  8. josemduarte
    added a commit that references this issue on Jan 5, 2022

    Merge pull request #998 from richarda23/#944-testcoverage

    a16d533
  9. jnbdz
    added 3 commits that reference this issue on Aug 2, 2026

    Merge pull request biojava#951 from richarda23/crc64checksumtest

    6ccbff8

    Merge pull request biojava#957 from richarda23/core-utils-tests-part2

    7ef1d37

    Merge pull request biojava#998 from richarda23/biojava#944-testcoverage

    cd3f048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.