Platform support
GitHub
Version control and CI/CD pipelines (GitHub Actions)

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
Request test generation
Comment
@coderabbitai generate unit tests in your PR or check the box in
CodeRabbit WalkthroughContext-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
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
Output delivery options
- Separate PR
- Same PR commit
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:
What’s next
Finishing Touches overview
See all available finishing touches and how to trigger them from any PR
Autofix
Automatically implement fixes for unresolved CodeRabbit review findings
Resolve merge conflicts
Let CodeRabbit analyze the intent behind conflicting changes and commit a clean resolution to your branch