Demo

Tusk’s test generation agent is optimized for generating unit 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/MR.

How Tusk Works

1

Agent generates tests

When a commit is pushed to a PR/MR, Tusk will look at the PR/MR details, existing tests and mocks, and other codebase context to generate tests for the happy path and edge cases.
2

Agent runs tests

Tusk will run these new tests in an isolated, ephemeral sandbox or via your Tusk test runner workflow to get the results.
3

Agent self-iterates

If any tests fail and Tusk determines that the failure is due to an error in the test code, Tusk will self-iterate to fix the test code.
4

View results

Once the PR/MR check is complete, Tusk will leave a self-updating comment with a summary of the tests generated as well as the check history.GitHub:Tusk's PR comment post-check in GitHub in light modeGitLab:Tusk's PR comment post-check in GitLab in light mode
5

Review test cases

Click View tests at the top of Tusk’s PR comment to view the generated test cases in the Tusk web app.Tusk's automated tests in light modeIf using GitHub, you can also view Tusk’s generated test cases in the GitHub check output page.Tusk's automated tests GitHub in light mode
6

Examine test details

Review the test code and justification for each test case, whether it passed or failed, the test execution logs, as well as potential fixes for failing tests.
7

Add tests to PR/MR

In the Tusk web app, select the test cases you want, then click Commit X of Y tests. You can also create a separate PR/MR for the tests if you’d like to resolve failing tests separately.If using GitHub, you can click Incorporate tests from within the check output to add all generated tests to the PR/MR’s branch.Screenshot of Tusk's 'Add to branch' button
8

Agent commits tests

You will see a new commit in the PR/MR with the Tusk tests added. Good to go!GitHub:Screenshot of Tusk's new commit with tests in GitHubGitLab:GitLab commit with tests in light mode
Questions? Reach out to support@usetusk.ai. We will respond as soon as possible.

Coming Up

  • Self-serve set up for new test execution environments ✅
  • Option to create separate PR for Tusk tests ✅
  • CoverBot - scheduled Tusk pipeline to backfill unit tests ✅
  • Maintaining existing test files in scope of PR ✅
  • Revamped test generation output page 🟧
  • AI-powered API testing