Overview
Tusk allows you to provide custom instructions to the testing agent to meet your testing guidelines on a per repo basis. Although Tusk by default explores your codebase at runtime to adhere to your testing best practices, providing custom instructions ensures Tusk is aware of specific symbols to test, preferred testing patterns, etc.How to Customize
- After a test check is enabled for your repo, go to the Repositories page and click on the gear icon.
- Click on the Customization tab.

- Select the repo for which you want to modify custom instructions by using the Repo field in the top right corner.
- On the left, select the testing environment you want to customize.
-
You will see a list of fields that you can customize below.
- Symbol selection guidelines: Types of symbols (i.e., functions, methods) that should or should NOT be tested.
- Test code guidelines: Best practices for writing tests, creating mocks, using factories, importing dependencies, etc.
- Edge case guidelines: Notes on the types of edge cases to focus on finding
- Test location guidelines: Naming conventions for test files and where they should be placed in the repo
- Click the Save button after editing each section.
- Tusk will now use these custom instructions to generate tests for the repo.
Editors support markdown formatting and ”@” mentions for file references.
Common Customization Examples
Use these examples as starting points. Copy, paste, and adapt them in the Customization tab. If you have docs,.cursor/rules, or CLAUDE.md files, you can ”@” mention relevant files in the customization.
Symbol Selection Guidelines
By default, Tusk selects the most relevant symbols in your PR/MR to test. Influence this by customizing which symbols to test.Exclude external service calls
Exclude external service calls
Customize this based on your repository’s external dependencies.
Focus on specific directories
Focus on specific directories
Customize this based on your repository’s directory structure.
TypeScript-specific symbol selection
TypeScript-specific symbol selection
Python-specific symbol selection
Python-specific symbol selection
Test Code Guidelines
By default, Tusk finds relevant test files in your codebase and uses them as context when generating tests. Providing customization on how you setup/teardown tests, specific test patterns, etc. will help improve the quality and latency of Tusk’s test generation.Database testing approaches
Database testing approaches
Adapt this to your repository’s database setup. If using a test harness, ”@” mention that file.Option 1: Live Test DatabaseProvide a template example for how to setup/teardown tests for your repository and how to seed data in the database.Option 2: Mock DatabaseProvide a template example for how to mock database calls.
External dependency mocking
External dependency mocking
If you use a specific pattern for mocking external dependencies, provide a template example in addition to general guidelines.
Test structure
Test structure
Customize this based on your repository’s testing framework.
Test data factory usage
Test data factory usage
Framework-specific testing patterns (Jest example)
Framework-specific testing patterns (Jest example)
Framework-specific testing patterns (Pytest example)
Framework-specific testing patterns (Pytest example)
Edge Case Guidelines
By default, Tusk will find relevant test cases by looking at business context, usage of the symbol, and the symbol’s dependencies. Customization will help Tusk focus on the most important edge cases for your repository.Data validation edge cases
Data validation edge cases
Authentication edge cases
Authentication edge cases
Async operation edge cases
Async operation edge cases
Test Location Guidelines
By default, Tusk looks at the existing test files in your codebase to determine the best location for new test files.Standard file organization
Standard file organization
Framework-specific file organization
Framework-specific file organization
Function-specific testing
Function-specific testing