Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Feature] Increase the coverage of OC organization service to >30% #2063

Open tschaffter opened 10 months ago

tschaffter commented 10 months ago

What product(s) is this feature for?

OpenChallenges

Description

No response

Anything else?

No response

Code of Conduct

tschaffter commented 9 months ago

Added to Sprint 23.10

tschaffter commented 8 months ago

Added to Sprint 23.11

mdsage1 commented 8 months ago

2348 improved overall coverage to 15% and exception coverage to 100%

tschaffter commented 7 months ago

@mdsage1 Can you please add an update to this ticket? We usually do it like this:

## Update yyyy-mm-dd

Description of where this ticket stands, whether there are blockers, expected completion date.
mdsage1 commented 7 months ago

Update 2023-12-04

PR https://github.com/Sage-Bionetworks/sage-monorepo/pull/2348 approved on 12-04-2023 improving unit test coverage for exceptions to 100%. PR is pending as well as the implementation of additional unit tests to reach > 30% coverage in org service. Current organization service unit test coverage is now 15%.

Blockers

Using a test database for unit tests Will need to determine the appropriate way to either Mock the database or use another method before unit tests can be implemented for the classes related to the database.

Image

tschaffter commented 7 months ago

Current organization service unit test coverage is now 15%.

The reference is the value in the CODE QUALITY dashboard (9.5%).

Using a test database for unit tests

I will take over this ticket or assign it to a backend engineer if we can get access to one next year. For now I'm adding this ticket back to the backlog.

tschaffter commented 7 months ago

Added to backlog

tschaffter commented 7 months ago

Added to Sprint 23.12

mdsage1 commented 7 months ago

Update 2023-12-08

PRs, #2348 and #2388, have been merged to address unit testing in organization service. Overall coverage increased to 12.2% for organization service after #2388 was merged. image

tschaffter commented 5 months ago

Added to Sprint 24.1

tschaffter commented 5 months ago

@mdsage1 Can you please provide an update on this ticket and when it could be completed?

tschaffter commented 5 months ago

@mdsage1 I will take over this task, which I think you almost complete.

tschaffter commented 5 months ago

Added to Sprint 24.2

mdsage1 commented 4 months ago

@tschaffter Please review PR #2389 so that I can document the updates to the coverage that resulted from the unit tests I wrote. These updates should be what's needed to push coverage of OC organization service above 30% but cannot be verified until the PR has been reviewed again. Your suggested changes were implemented ~1 month ago.

tschaffter commented 4 months ago

The PR #2389 has been merged. Thanks!

mdsage1 commented 4 months ago

PR #2389 only increased code coverage by 0.1% which seems misaligned with expectations. The new coverage is at 12.3%. @tschaffter plans to investigate what factors impact this.

mdsage1 commented 4 months ago

Overall coverage increased to 17.1% for organization service after #2389 was merged.

image

tschaffter commented 4 months ago

Update 2024-02-23

Reopening now that we can get the coverage value from Sonar and that this value is below the target (30%). @mdsage1 will investigate where the discrepancy come from.

tschaffter commented 4 months ago

Added to Backlog

mdsage1 commented 3 months ago

Update 2023-03-18

The latest Sonar Code Quality Report indicates that organization-service coverage is 22.6%. No new unit tests have been added. image