The Simplest Way to Make Backstage and Junit Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair Backstage and JUnit by sending build test reports into your service catalog. This setup lets teams check test health right next to service docs and owners. Your build pipeline runs code checks and writes standard report files after each commit. The portal then reads those files from storage and shows pass or fail rates. Developers do not need to jump between build tools to find broken tests. Instead, one page shows service owners, recent deploys, and test results together. How Backst

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You pair Backstage and JUnit by sending build test reports into your service catalog. This setup lets teams check test health right next to service docs and owners.

Your build pipeline runs code checks and writes standard report files after each commit. The portal then reads those files from storage and shows pass or fail rates. Developers do not need to jump between build tools to find broken tests. Instead, one page shows service owners, recent deploys, and test results together.

How Backstage and JUnit move test data and check roles

First, the test runner runs during a build and creates an XML report file. Next, the build job sends that file to a storage bucket or build server. When a user opens a service page, the portal asks for the latest report. The portal uses a saved key or cloud role to read that stored file.

Good role checks keep this data flow safe across your whole team. Each service in the catalog maps to one specific repo and one build job. The portal checks who logged in before it shows the test page for that app. Then, the backend uses a read-only role to fetch the matching test file. It parses the pass counts, failure notes, and run times for the screen.

You should tie these read keys to single project paths in your storage. That way, one broken plugin cannot read test files from every team at once. Short key lifetimes also help cut down risk when teams rotate build servers.

Common failure modes and how to scope roles

Many teams start by giving the portal one giant key for the build tool. This shared service account often has admin rights across all repos and build pipelines. If someone steals that key, they can trigger builds or change production code. Broad tokens also make it hard to see which plugin asked for a file.

Unlogged reads and noisy test logs create another big risk for teams. Failed tests often print raw database rows or request bodies into the error log. Those stack traces can hold user emails, phone numbers, card numbers, or national IDs. Anyone with portal read rights might see those sensitive strings in the test view.

End-to-End Encryption + Backstage Security Plugins: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, give the portal backend a tight, read-only role for test reports. Block the portal from starting jobs, editing pipelines, or reading build secret stores. Set up network rules so the portal only talks to the report storage endpoint. Scrub or mask emails and card numbers before the build job saves report files. Finally, turn on audit logs on your storage buckets to track every file read.

Keeping test report workflows fast and tidy

Test files grow fast when teams run hundreds of builds every single day. Set lifecycle rules on your storage bucket to delete old test reports after thirty days. Keep only the latest run and a few past runs for trend charts. This keeps portal pages fast and lowers your cloud storage bill each month.

Also, check that every service catalog file points to the right build job name. Missing tags or wrong project names cause empty test tabs that confuse developers. A clean tag rule makes sure new apps show test status on day one.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Does the portal run the test suite by itself?

No, your build server runs the tests and writes the output report files. The portal only reads those finished reports and shows the results on the screen.

Where should teams store test report files for the portal?

Teams usually store reports in cloud object buckets or inside the build server API. Pick a spot that supports read-only roles and logs every file fetch request.

How do we stop sensitive data from showing up in test failure logs?

Use fake test data during builds so real user info is masked in responses before reaching the runner. You can also run a log filter that rewrites emails and card numbers first.

The query runs. The emails stay hidden.