Overview
Generate unit and integration tests for your PRs
Fill out this form to get fast-tracked for access.
Test Generation
Tusk’s test generation agent is optimized for generating unit and integration tests for your code changes. Increase your code coverage with high-impact tests that check for edge cases.
For engineering teams with a testing culture, this feature helps to cut down on the time spent writing good tests, which make up 25-50% of the time spent on a PR.
How It Works
-
When a commit is pushed to a PR, Tusk will look at the PR details, existing tests (if any), and codebase context to generate tests for the happy path and edge cases.
-
Tusk will run these new tests in an isolated sandbox.
-
If any tests fail and Tusk determines that the failure is due to an issue in the test, Tusk will auto-iterate on the test case.
-
Once the check is complete, Tusk will leave a PR comment with a summary of the tests generated as well as the check history.
- You can view the test cases created by clicking View tests or going to the check’s Details.
-
You can view the code for each test case, the reason why it was created, whether it passed or failed, and the test execution logs.
-
Click Incorporate tests to add the tests to the PR. If you’d like to add only a subset of the Tusk tests, hover over the code block, click to copy the test to your clipboard, and add it to the test file(s) in your IDE.
- You will see a new commit in the PR with the Tusk tests added. Good to go!
Questions? Reach out to support@usetusk.ai. We will respond as soon as possible.
Coming Up
-
UI to review and incorporate select test cases
-
E2E test generation with codebase context
-
GitLab support
Was this page helpful?