Skip to content

Add a /test skill to run singular tests or per module tests#5111

Open
adinauer wants to merge 1 commit intomainfrom
feat/ai-test-skill
Open

Add a /test skill to run singular tests or per module tests#5111
adinauer wants to merge 1 commit intomainfrom
feat/ai-test-skill

Conversation

@adinauer
Copy link
Member

📜 Description

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • Add a /test skill to run singular tests or per module tests by adinauer in #5111

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- Add a /test skill to run singular tests or per module tests ([#5111](https://github.com/getsentry/sentry-java/pull/5111))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 0fa5d7f

@adinauer adinauer marked this pull request as ready for review March 5, 2026 05:07
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

|---------------|-----------|
| `sentry-android-*` | `testDebugUnitTest` |
| `sentry-compose*` | `testDebugUnitTest` |
| Everything else | `test` |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test task detection misses Android module naming pattern

Medium Severity

The module-to-test-task mapping only handles sentry-android-* and sentry-compose* as needing testDebugUnitTest, but sentry-launchdarkly-android is also an Android library module (it uses the com.android.library Gradle plugin) that requires testDebugUnitTest. Since its name doesn't match either pattern, it falls through to the plain test task, which would fail. The pattern matching needs to also account for non-sentry-android-*-prefixed Android modules.

Fix in Cursor Fix in Web

---
name: test
description: Run tests for a specific SDK module. Use when asked to "run tests", "test module", "run unit tests", "run system tests", "run e2e tests", or test a specific class. Auto-detects unit vs system tests. Supports interactive mode.
allowed-tools: Bash, Read, Glob
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interactive mode tool not listed in allowed-tools

Medium Severity

The skill's interactive mode (Steps 0, 1, and 3a) instructs Claude to use AskUserQuestion at multiple decision points, but allowed-tools only lists Bash, Read, Glob. Since AskUserQuestion is a distinct Claude Code tool that can be included in allowed-tools, its omission means the interactive mode feature described throughout the skill cannot function as intended when tool restrictions are enforced.

Additional Locations (1)

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants