This is the third post in our Chatbot Chronicles series.
As a development agency, we know code quality and error reduction are critical to any successful software project. At Sauce, we use artificial intelligence to improve code quality and reduce errors through code reviews and unit testing.
In a previous post, I explored using ChatGPT as a pair programmer for everyday tasks. Now, let’s focus on two essential areas: code reviews and writing unit tests.
Code Reviews
We’ve practiced code reviews since Sauce began over seven years ago.
Every line of code must pass review by at least one team member before entering production.
This process helps improve quality and prevent bugs. However, it also brings challenges.
Developers must shift focus to review others’ work.
Junior developers may hesitate to question senior engineers’ commits.
Despite this, we don't see human reviews disappearing any time soon.
We now ask ChatGPT to review smaller code changes and suggest improvements.
It handles line-by-line feedback well, which helps developers learn unfamiliar languages or frameworks.
Since responses vary, developers often see different approaches to solving the same problem.
Though ChatGPT can’t yet understand large codebases fully, tools like GitGuardian and Bloop.ai are working on this.

Unit Tests
Writing tests is just as important as writing code—but often less enjoyable. Developers sometimes find writing tests harder than creating the function itself. Still, test coverage plays a huge role in reducing future bugs and improving maintainability.
At Sauce, we now use ChatGPT to help with test creation. Developers provide the function, and the AI generates a unit test. They then tweak the test using custom parameters or ask the bot for changes.
For example, we gave ChatGPT a utility function in an EmberJS project. We specified the framework, and ChatGPT correctly generated a QUnit test. It even identified the function as a utility—impressive.

What’s Next?
We believe artificial intelligence will become a normal part of software development. By using AI in our review and testing process, we’ve improved quality and reduced errors. At Sauce, we’re excited to continue pushing these boundaries.

