Write regression tests

Give Gilfoyle a fixed or reported bug and get a regression test that fails on the old behavior, passes on the fix and fits your existing suite.

With Gilfoyle, Software Engineer

Book a demo
Get started for free with up to $130 in free credits
test-coverage

Example brief · Hypothetical workflow

Your brief

We fixed the duplicate-invoice bug last week without a test. Add a regression test that would have caught it, and prove it fails without the fix.

GilfoyleAPP

I’ll reproduce the original failure, write the test where your suite expects it and run it with and without the fix.

See example output ↓

How Gilfoyle handles it.

Starts: When a bug is fixed or reproduced, or you ask for test coverage on a specific defect.

1. Pin down what went wrong

Gilfoyle reads the bug report, the fix commit and your test conventions. The test targets the behavior that broke, not the implementation details of the fix, so it survives a later refactor.

2. Prove the test catches it

Using connected Claude Code or Codex with GitHub, Gilfoyle runs the new test against the code from before the fix to confirm it fails for the reported reason, then against current code to confirm it passes. A test that passes both ways is reworked or reported.

3. Hand over a reviewable test

The draft PR adds the test in the suite’s existing style, with both results and the commands used. Your reviewers decide whether it merges.

A test that fails for the right reason.

Use this to lock in a known bug fix. Broader testing of new work before release is a separate job.

Hypothetical finished result

Example output

Duplicate-invoice regression test

Hypothetical: a fixed bug had created two invoices when a payment webhook was delivered twice.

Test
invoice-webhook.test.ts delivers the same payment event twice and asserts that one invoice exists and the event ID is recorded once.
Proof
Against the commit before the fix, the test fails with two invoices created. Against main, it passes. Both commands and outputs are in the PR.
Scope
A second case sends two different events for the same customer, so the test does not forbid legitimate invoices. Retries from the payment provider beyond the webhook were not exercised, and the PR says so.

The apps this job needs.

Connect the accounts and actions for your workflow. Start in Artie or add your Artisan to Slack; access stays within your account permissions.

Explore apps
GitHub
Connect the repository with access to the fix history and permission to open draft PRs.
Claude Code or Codex
Connect the coding tool and provide the test runner, fixtures and any local services the suite needs.
Linear (optional)
Connect the project if the original bug report and acceptance criteria live there.

Questions about this workflow

Why run the test against the old code?

A regression test only helps if it fails without the fix. Running it both ways shows it detects the bug rather than simply passing.

Can Gilfoyle write a test for a bug that isn’t fixed yet?

Yes. The test is handed over as an expected failure with the reproduction, or paired with a fix if you authorize that coding work.

Will Gilfoyle change our test framework?

No. Tests follow the framework, file layout and helpers already in the repository.

Enter your referral code

Your friend’s code adds $20 in credits when you sign up.

Book a demo

Choose a date and time, then enter your email to schedule a call.

Loading available times