This feature is available exclusively as part of the Pro plan and is not
included in the Lite plan. Please refer to our pricing
page for more information about our plans
and features.
This feature is in beta.
Platform support
Version control
GitHub (GitLab and Bitbucket coming soon)
CI/CD integration
GitHub Actions (automatic build failure resolution)

PR comment command
Type
@coderabbitai generate unit tests
in any PR comment to generate tests
automaticallyUI checkbox
Use the Generate unit tests checkbox in the CodeRabbit Walkthrough for
one-click generation
How it works
1
Request test generation
Comment
@coderabbitai generate unit tests
in your PR or check the box in
CodeRabbit Walkthrough2
Context-aware analysis
CodeRabbit examines your code changes with full context - understanding your
testing frameworks, existing patterns, and team guidelines from previous
reviews to identify what needs coverage
3
Intelligent test generation
Tests are generated based on your project’s specific context, including
proper mocking strategies, framework conventions, and edge cases that matter
for your codebase
4
Choose delivery method
Receive tests via separate PR, new commit in current PR, or comment to
copy-paste
5
Automatic CI integration
For separate PRs, CodeRabbit analyzes your GitHub Actions workflows and
fixes build failures, import errors, and dependency issues automatically
Output delivery options
- Separate PR
- Same PR commit
- Comment
Recommended for most teams CodeRabbit creates a new pull request
containing all generated tests. This approach keeps your feature PR focused
while allowing independent review of test code. Key advantage:
CodeRabbit automatically fixes CI/CD integration issues. If tests fail due
to missing dependencies, import errors, or configuration problems,
CodeRabbit analyzes your GitHub Actions logs and pushes fixes. This means
you get working tests, not just test code that looks right.
Path-specific customization
Configure test generation for different parts of your codebase using.coderabbit.yaml
: