r/ChatGPTCoding • • 23d 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/TheVibrantYonder 23d ago

I'm interested to see what others say, but in your case, I'm not really clear on the details based on what you wrote. It sounds like you might just need clearer documentation/structures/rules to reduce the chance of regressions? Then just keep running your regression test suite and make sure it stays up to date.

If changes are regularly resulting in regressions though, I think that's usually a documentation/instruction issue or maybe a project structure issue if your project is set up in a way that makes it really easy to break and hard to maintain.

Feel free to DM me with more details and I can try to give more specific advice though. I love this stuff.

With regard to my own projects, I'm still testing different approaches to verification and testing. I haven't found anything that works perfectly without handholding.

1

u/_ACTUALin 23d ago

Yeah, that's pretty much where I'm at. I've got the real-world industry experience to understand how the workflow should behave and recognize when something's wrong, but I don't have a traditional software development background. So while I can identify problems and build test scenarios around them, I'm still learning what tools and best practices are out there for handling this stuff properly.

I've been tightening up instructions, keeping fixes narrow and running previous tests to catch regressions, but I'm sure there are better ways to approach it that I just haven't been exposed to yet lol. That's partly why I posted here, to learn how other people are tackling it.

2

u/TheVibrantYonder 23d ago

Yeah, I don't have a traditional development background either, so I understand! I've been trying to do more research to improve.

I did some reading about unit tests the other day to make sure I was managing those properly. There are some good "how to organize unit tests" guides you might find useful (a Google search should turn them up). I'm reviewing how I maintain them after looking at some of those guides and I was able to do a lot of cleanup.

1

u/StrikingTop2709 18d ago

100% a modularity thing imo, big files with too many responsibilities always turn into whack-a-mole with AI fixes