r/ChatGPTCoding • • 26d ago

Discussion How are you handling regression testing when coding with ChatGPT?

I've been using AI-assisted coding to develop a technical reporting app, and I've run into something that's been driving me nuts lol.

I'll identify an issue, work through a fix with AI, test it, and everything looks good. Then I'll run an older test case and discover something completely unrelated has stopped working.

The app deals with unfamiliar Excel workbooks and supporting evidence, so I've got a growing collection of test cases covering formulas, conflicting information, missing measurements and incorrect data associations.

Some comparisons are automated, but I still need to manually inspect a lot of the results. Especially situations where the output looks correct but the information has ended up in the wrong place.

I've started being much stricter about keeping fixes narrow and comparing results against previous tests. It's helped, but damn, the testing is becoming a project of its own.

I've been considering bringing GitHub into the process to organize failures and regression cases.

For those using ChatGPT or Codex on larger projects, how are you actually handling this? Are you having AI write tests before making changes, using a separate agent to review fixes, or doing most of the verification yourself?

2 Upvotes

22 comments sorted by

View all comments

2

u/sapplex1 25d ago

This is the part I still do by hand. I build small iOS apps, and the rule I ended up with is: check the behavior, not the diff. A diff can look clean while the feature is wrong in a way only using it reveals, so before I let an agent touch a feature I write down what must be true when it is done, and I run the app through the real flow myself — create a booking, log a sale, check the math — instead of trusting that it runs.

Two things helped most: every fixed bug gets a failing test first, so the agent cannot quietly undo a fix later, and I keep fixes narrow, one behavior at a time. For your 'looks right but in the wrong place' problem, the test that caught it for me was asserting on the value in its final place, not just that output was produced. A number can exist and still be in the wrong field.

On GitHub I would keep it simple: one issue per regression case with the failing input attached, so the input itself becomes the test. I have not found a separate review agent that earns its keep yet — the checking is still mine.

1

u/_ACTUALin 25d ago

That's a really good point about checking the behaviour rather than just the output. The GitHub suggestion is interesting too, especially as the number of test cases starts getting out of hand lol. Appreciate the advice!