Write the missing tests
A PR with passing checks
A nightly schedule starts an agent that finds untested code, writes the tests and opens a pull request by morning.
Best for
- Codebases with thin coverage on code that changes often
- Teams that review tests in the morning
Uses
- A connected GitHub repository
- A Project
- An automation with a schedule trigger
Automation · Nightly tests
POST /o/{org}/p/{project}/automations/{automation}/triggers{
"kind": "schedule",
"config": {
"cron": "0 2 * * *",
"timezone": "America/Los_Angeles"
}
}Watch it work, then read what comes back
GET /o/{org}/sessions/{session}/eventsevent: tool_usebash · git log --since=7.days --statevent: thinkingrefunds.ts changed 9 times and has no tests for partial refunds.event: tool_usewrite · refunds.test.tsevent: tool_result18 passedevent: messageOpened a pull request with 6 new tests.GET /o/{org}/sessions/{session}- status
completed- branch
rush/tests-refunds- pr_url
github.com/acme/payments/pull/…- total_cost_usd
0.52
Steps
- 01
Pick the Project
The schedule runs in the Project's repository, with its skills and connections.
- 02
Add a schedule
A
scheduletrigger takes acronexpression and atimezone, oreveryfor a fixed interval. - 03
Read the morning pull request
Each night opens one pull request on its own branch. Failing checks end the run
needs_review.
In the API and the docs
Related
All use casesUpgrade dependencies weekly
A PR, or needs_review
Once a week an agent bumps your dependencies, runs the tests and opens a pull request, or stops at needs_review and says why.
Open the recipeReview every pull request
A review on the PR
Each pull request gets an agent that checks it out in its own sandbox, runs the tests and posts a review with the evidence.
Open the recipe