Best Practices
Developer Experience
Ideal workflow for using Tusk as a developer
Tusk is triggered when a PR/MR (draft or otherwise) is created or a new commit is pushed to the PR/MR’s branch. It shows up as a non-blocking check, akin to automated code review but with the added benefit of scaling your testing infra.
Recommended Workflow
- Software engineer creates a draft PR/MR with their code changes.
- On PR/MR creation, Tusk takes 8-15 mins to generate, run, and iterate on its unit tests (latency varies depending on PR/MR size and complexity).
- Engineer clicks on Tusk’s PR/MR comment and reviews the test generation output in the Tusk web app.
- Engineer selects which unit tests they want to commit and clicks Incorporate tests in the Tusk web app.
- If there are failing tests, engineer checks out the branch and fixes the bug in their code causing the failing test. Tusk labels failing tests with a
[Tusk] FAILING TEST
comment in the test file for easy reference. - Note: Once Tusk’s tests are incorporated, the agent no longer re-runs test generation to avoid excessive looping.
- If there are failing tests, engineer checks out the branch and fixes the bug in their code causing the failing test. Tusk labels failing tests with a
- Engineer marks the PR as ready for review.
- Go through your typical PR review workflow before approving and merging the PR/MR.
Was this page helpful?