Skip to content

chore(scorecard): add startTestBackend module tests for all 9 backend modules - #4581

Open
teknaS47 wants to merge 1 commit into
redhat-developer:mainfrom
teknaS47:scorecard-modules-backend
Open

chore(scorecard): add startTestBackend module tests for all 9 backend modules#4581
teknaS47 wants to merge 1 commit into
redhat-developer:mainfrom
teknaS47:scorecard-modules-backend

Conversation

@teknaS47

@teknaS47 teknaS47 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

RHIDP-15181

Adds startTestBackend integration tests for all 9 scorecard backend modules. Each test verifies
that the module registers its metric providers (and collectors, where applicable) with the scorecard
plugin at runtime without errors.

Follow-up to the scorecard backend POC in #3414

What's included

  • 9 new module.test.ts files - one per module, each using startTestBackend with scorecardPlugin + the module under test
  • 9 updated package.json files - adds supertest, @types/supertest, @backstage/plugin-catalog-node, and scorecard-backend as devDependencies
  • yarn.lock updated for the new dependencies

Modules covered

Module Metrics verified Notes
openssf 18
code-coverage 8
dependabot 4
sonarqube 12
dora 4 Uses scorecardCollectorsServiceRef
github 1 + 3 collectors
jira 1 + 1 collector Requires minimal jira config
catalog config-driven Tests with and without config
filecheck config-driven Tests with and without config

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app

rhdh-gh-app Bot commented Sep 4, 2026

Copy link
Copy Markdown

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-catalog
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-code-coverage
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-dependabot
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-dora
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-filecheck
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-github
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-jira
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-openssf
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-sonarqube

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-catalog workspaces/scorecard/plugins/scorecard-backend-module-catalog none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-code-coverage workspaces/scorecard/plugins/scorecard-backend-module-code-coverage none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-dependabot workspaces/scorecard/plugins/scorecard-backend-module-dependabot none v1.0.2
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-dora workspaces/scorecard/plugins/scorecard-backend-module-dora none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-filecheck workspaces/scorecard/plugins/scorecard-backend-module-filecheck none v1.0.2
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-github workspaces/scorecard/plugins/scorecard-backend-module-github none v4.2.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-jira workspaces/scorecard/plugins/scorecard-backend-module-jira none v4.2.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-openssf workspaces/scorecard/plugins/scorecard-backend-module-openssf none v1.0.2
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-sonarqube workspaces/scorecard/plugins/scorecard-backend-module-sonarqube none v1.0.2

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 4, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:01 PM UTC · Completed 12:15 PM UTC

Commit: b8435fd · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $5.09

@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.46%. Comparing base (57947b4) to head (b8435fd).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4581      +/-   ##
==========================================
+ Coverage   62.37%   62.46%   +0.08%     
==========================================
  Files        2607     2607              
  Lines      104756   104792      +36     
  Branches    29430    29430              
==========================================
+ Hits        65346    65458     +112     
+ Misses      38819    38743      -76     
  Partials      591      591              
Flag Coverage Δ *Carryforward flag
adoption-insights 84.77% <ø> (ø) Carriedforward from 57947b4
ai-integrations 78.80% <ø> (ø) Carriedforward from 57947b4
app-defaults 56.22% <ø> (ø) Carriedforward from 57947b4
augment 46.67% <ø> (ø) Carriedforward from 57947b4
boost 80.51% <ø> (ø) Carriedforward from 57947b4
bulk-import 73.12% <ø> (ø) Carriedforward from 57947b4
cost-management 13.35% <ø> (ø) Carriedforward from 57947b4
dcm 73.47% <ø> (ø) Carriedforward from 57947b4
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from 57947b4
e2e-extensions 62.31% <ø> (ø) Carriedforward from 57947b4
e2e-global-header 50.35% <ø> (ø) Carriedforward from 57947b4
e2e-homepage 61.11% <ø> (ø) Carriedforward from 57947b4
e2e-intelligent-assistant 47.04% <ø> (ø) Carriedforward from 57947b4
e2e-orchestrator 49.52% <ø> (ø) Carriedforward from 57947b4
e2e-orchestrator-plugin 49.51% <ø> (ø) Carriedforward from 57947b4
e2e-quickstart 55.21% <ø> (ø) Carriedforward from 57947b4
e2e-scorecard 50.21% <ø> (ø) Carriedforward from 57947b4
e2e-theme 16.36% <ø> (ø) Carriedforward from 57947b4
extensions 57.37% <ø> (ø) Carriedforward from 57947b4
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 57947b4
global-header 68.09% <ø> (ø) Carriedforward from 57947b4
homepage 48.39% <ø> (ø) Carriedforward from 57947b4
install-dynamic-plugins 71.31% <ø> (ø) Carriedforward from 57947b4
intelligent-assistant 76.43% <ø> (ø) Carriedforward from 57947b4
konflux 91.98% <ø> (ø) Carriedforward from 57947b4
lightspeed 69.02% <ø> (ø) Carriedforward from 57947b4
mcp-integrations 84.14% <ø> (ø) Carriedforward from 57947b4
orchestrator 71.13% <ø> (ø) Carriedforward from 57947b4
quickstart 63.74% <ø> (ø) Carriedforward from 57947b4
sandbox 79.56% <ø> (ø) Carriedforward from 57947b4
scorecard 89.47% <ø> (+1.51%) ⬆️
theme 87.91% <ø> (ø) Carriedforward from 57947b4
translations 5.12% <ø> (ø) Carriedforward from 57947b4
x2a 77.10% <ø> (ø) Carriedforward from 57947b4

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Low

  • [stale-reference] workspaces/scorecard/plugins/scorecard-backend-module-filecheck/package.json@backstage/config removed from devDependencies, but the existing test file src/metricProviders/FilecheckMetricProvider.test.ts imports ConfigReader (a value import) from @backstage/config. The package remains available transitively through @backstage/backend-test-utils with the workspace's nodeLinker: node-modules configuration, so tests will not break in practice, but the explicit declaration should be retained for dependency hygiene.

  • [stale-reference] workspaces/scorecard/plugins/scorecard-backend-module-jira/package.json@backstage/config and @backstage/types removed from devDependencies, but existing tests (clients/JiraClientFactory.test.ts, clients/base.test.ts) import from these packages. Same transitive availability applies via hoisted node_modules. Consider retaining these devDependencies for explicitness.


Labels: PR adds integration tests for scorecard backend modules.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge Tests labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge Tests workspace/scorecard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant