Overview
Generate unit and integration tests for your PRs
This product is currently in beta. Fill out this form to get early access.
Test Generation
We’ve built a new Tusk agent that’s optimized for generating unit and integration tests for your code changes. Increase your code coverage with tests that actually 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 that already contains tests, Tusk will look at the existing tests and use your codebase context to generate additional tests for 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 a bug in the test, Tusk will iterate on the test case until it passes.
-
Once the check is complete, Tusk will display the test cases created in the check’s details.
-
You can view the code for each test case, the reason why it was created, and whether it passed or failed.
-
Click Add to branch to incorporate the tests into the PR. If you’d like to add only a subset of the Tusk tests, you can click to copy them to your clipboard and add them 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.