AI Test Generation and PR Review in Sentry (Now in Open Beta)

You write code. Open a PR. CI runs. PR merges. Prod’s on fire by 5pm.
Maybe you skipped writing some tests. (It's tedious, sometimes unclear, and easy to ignore when you're racing to ship—until something breaks and you realize a test could’ve saved your Friday night.)
Maybe the PR review was more of a drive-by 👍 from a teammate who barely had time to skim the diff.
But reviews and tests matter. They catch logic issues, enforce consistency, and help future-you (and your team) understand what the code was supposed to do. They’re the invisible scaffolding that keeps everything from collapsing under scale and entropy.
Sentry is bringing automated test generation and pull request reviews directly into your code review workflow in GitHub — so you can move fast without worrying (as much) about breaking prod.
Helping you ship fewer regressions, add the tests you didn’t write actually need, and get actionable, relevant feedback before you merge.
Untested code has a funny way of becoming broken code. So we built an actually useful AI agent to help you write unit tests and maintain decent test coverage.
Oh and it’s dead simple to call:
Comment @sentry generate-test
on your PR, and Sentry will generate unit tests covering the change.
Sentry analyzes the code in your repo to understand your project’s structure to generate runnable tests to cover every line in the PR. No plugins. No need to go back into your IDE and prompt a separate agent. Just a PR comment in GitHub and an integration you probably already have.
Now when you open a PR that updates logic in checkout.js
. You can comment @sentry test
. Sentry will generate test cases for discount edge cases, cart scenarios, and all the conditional branches you just added.
Thorough PR reviews are hard to pull off consistently. Maybe you’re juggling multiple projects. Maybe you’ve got three other reviews in your queue and only ten minutes before your next meeting. Either way, you’d probably rather focus on the big picture than squint at every typo.
So, just for you, we built AI PR Review—to help fill the gaps when time, context, or capacity are in short supply.
When asked, Sentry will automatically add a structured, AI-generated review to your pull request. You’ll see:
A clear, concise summary of your code changes, including:
Key technical changes – to quickly see what changed in the code and why. Like swapped in
lodash.debounce()
for cleaner, more reliable input handling.Architecture decisions – to highlight shifts in how the system is structured. Like introducing an
EventBus
to decouple checkout and inventory logic.Dependencies and interactions to surface what this change touches or relies on. Like adding a
currency-converter
dependency that impacts pricing.Risk considerations – to call out potential failure points. Like retry logic that could trigger duplicate charges without idempotency.
Key implementation details to explain non-obvious logic or edge case handling. Like adding a fallback when
couponCode
is missing to prevent errors.Comments on individual lines or blocks of code highlighting any potential issues, bugs, formatting errors, typos, and logical inconsistencies, along with suggested fixes.
Comments and suggestions that improve over time with your 👍 or 👎.
The goal isn’t to replace human feedback — it’s to support it. Sentry brings in context from your repo: related files, previous PRs, and it can search the internet when needed.
So when you push a PR updating billingUtils.ts
for multi-currency support, you comment @sentry review
. Instantly, Sentry summarizes your changes, flags a risky exchangeRate
check, and links a related bug from a past PR—all before anyone else has even seen it.
It’s like having a teammate who always has time to look closely at every little line and typo, even when everyone else is heads-down.
If you’re already using Sentry with GitHub, make sure you’re using the Sentry Seer GitHub App, then just leave a comment and see what happens:
@sentry generate-test
or
@sentry review
You might be surprised by how useful these tools are—even when your code looks “fine.”
Less breakage. More coverage. And finally, PR reviews and tests that feel like part of the dev process—not just homework.
Let us know what you think. Drop us an email at prevent@sentry.io, or come hang out in the `#sentry_prevent_beta` channel on Discord.
If you’re new to Sentry, try it for free.