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:

GitLab:

5

Review test cases

Clicking View tests at the top of Tusk’s PR comment to view the generated test cases in our web app.

If using GitHub, you can also view Tusk’s generated test cases in the GitHub check output page.

6

Examine test details

You can view 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

Click Incorporate all to add all the generated tests to the PR/MR’s branch.

If you’d like to add only a subset of Tusk’s generated tests, go to the web app, select the symbols you’d like to add tests, then click Incorporate X of Y tests.

8

Agent commits tests

You will see a new commit in the PR/MR with the Tusk tests added. Good to go!

GitHub:

GitLab:

Questions? Reach out to support@usetusk.ai. We will respond as soon as possible.


Coming Up

  • Ability to backfill tests for existing code ✅

  • Self-serve set up for new test execution environments ✅

  • All test run latency 10 mins or less

  • Option to create separate PR for Tusk tests

  • Maintaining existing tests