, Claude Code works fairly effectively. You may enter a sequence of directions and have it produce code or different output for you. Nevertheless, there are some things you are able to do to vastly improve the efficiency of Claude Code, particularly in relation to programming.
On this article, I’ll discuss in regards to the primary approach that I’m utilizing daily to make my Claude Code a number of occasions simpler: automated / simpler testing.
On the floor, this would possibly sound like a boring subject, however once you study extra about it, testing, particularly when automated or made simpler, is an effective way to avoid wasting quite a lot of time. If you may make the agent check its personal implementations, that may make it far simpler at producing the answer that you simply wished to make.
Why automate testing
The primary cause why you must automate testing is that it merely makes you far simpler. In case you can have an agent check its personal implementations routinely, it can turn into much better at really managing to implement the answer you describe in your immediate. In the end, this results in you saving quite a lot of time since you don’t must iterate with the agent a number of occasions to get the precise answer you need.
Moreover, one other vital level is that now that coding brokers have turn into so efficient at producing code, the true bottleneck with programming has turn into testing. You should check that the implementation really works in accordance with what you take note of. I discover that I spend most of my time programming, testing totally different options, and ensuring all the things is working as anticipated. If you may make testing both simpler or fully automated, that may thus resolve the most important bottleneck I’ve in programming, which can naturally make me far simpler.
I consider this is applicable to lots of people who actively use coding brokers to program, and I’m simply sharing how I each automate and make my testing simpler.
Tips on how to automate testing
I’ll speak about just a few elements with regard to testing. First, I’ll speak about automating testing, which is once you give your agent entry to run checks itself. This could occur in many various methods. You may, for instance, give it testing scripts to run, unit checks to run, or full-on integration checks. Persevering with, I’ll talk about methods to make testing with people simpler. Generally it’s not attainable for the coding agent to totally do the check itself. Possibly it requires particular context or permissions. Possibly it’s an advanced motion inside a UI that you simply don’t need the coding agent to do, or that the coding agent can’t do, and so forth.
Agentic computerized testing
Listed here are the three major steps for computerized testing:
- Make certain the agent has all of the permissions it wants
- Immediate the agent to arrange checks and check its implementations
- Make certain the checks at all times run earlier than commits or merges, relying on once you need them to run.
- Guarantee all new code will get up to date checks and generally take a guide have a look at the checks to verify they work and do what you suppose they do.
I’ll begin by discussing how one can give the agent entry to operating checks. Crucial level you may notice right here is that you must make it attainable for the agent to run checks. That is achieved by giving it sufficient entry, for instance, perhaps it wants AWS entry to entry information, or perhaps it wants entry to the browser to navigate via the applying. Thus, step one right here is to make it possible for the agent has all of the permissions it wants.
In my expertise, you may run Claude Code with Dangerously Skip Permissions or Auto Mode, which was lately launched, and it really works very effectively. Sadly, when utilizing different coding brokers equivalent to Gemini or Chachipetee, I’ve not achieved this but as a result of I even have some experiences the place the coding brokers have achieved unintended actions that have been non-reversible. Nevertheless, this has by no means occurred after I used Claude’s fashions.
The second a part of automated testing is solely to immediate the agent to arrange checks. For instance, I ask my mannequin to arrange integration checks. Integration checks are primarily only a sequence of API calls that be sure that the movement via the applying is as anticipated. And with coding brokers, this works very well. For instance, have an LLM name that leads right into a parsing pipeline and so forth. You can also make the method deterministic and make sure the outcomes are right each time. Merely informing the agent to arrange integration checks will work very well; the mannequin will arrange the checks and truly instantly work higher.
You may as well simply ask the mannequin to create testing scripts that check an implementation and inform it that it ought to run that testing script to verify all the things works as meant, and never cease till the testing script works efficiently. The final half is essential as a result of generally the fashions are literally a bit lazy, and you must explicitly inform them that they’re not allowed to cease earlier than the implementation is profitable. This, after all, assumes that the implementation is feasible given the permissions and actions you’ve given to the coding agent.
Persevering with, it’s additionally vital that you simply make it possible for these checks run earlier than the code is pushed to manufacturing. You may run the check as pre-commit hooks, although this could gradual you down generally as a result of the checks must run earlier than each commit, and if the check takes a while, then it can gradual you down. You may as well make them run each time you have got a push, a brand new push to a pull request. I.e., if a pull request is up to date, then run integration checks. These checks may also be a part of GitHub actions, for instance, so that they routinely run, and also you don’t must run them in your pc. Nevertheless, in my expertise, it’s usually good to have these checks in your pc, because it makes it sooner and you’ll extra simply set off them.
Lastly, on the automated testing part, I wish to spotlight how you must just remember to continually replace your checks given new code that’s produced. For instance, if you happen to produce a brand new piece of code, be sure that so as to add new checks for it. And if you happen to take away outdated code, be sure that to take away the corresponding checks. It’s vital to take care of the checks in order that they’re efficient. Although this upkeep would possibly sound like additional work upfront, it can really prevent time in the long term since you’re not operating pointless checks, and also you’re guaranteeing that each one your code is examined, which lowers the possibility of bugs.
Moreover, I like to recommend that you simply generally manually examine the checks by actually wanting on the enter and output and asking the agent to point out you the outcomes. This guide inspection of checks can generally be very efficient in guaranteeing the check works as anticipated and makes it simple to find bugs within the check.
Make guide testing simpler
The second level on testing I wish to cowl is making guide testing simpler. After I speak about guide testing, I imply testing that requires a human to carry out it, and that may’t be achieved by an AI. Sadly, some testing needs to be achieved by you, and you’ll’t merely outsource it for an AI to do. This might occur due to a number of causes:
- The duty is simply too sophisticated for the AI to carry out, and you must carry out it your self
- The duty contains one thing the AI doesn’t have entry to or permission to. For instance, it requires admin entry that you simply don’t wish to give to your AI, or it makes use of audio that the AI doesn’t at the moment have entry to.
- The duty is simply too sophisticated for the AI to carry out, and also you don’t belief it to carry out it accurately.
In these circumstances, the very best factor you are able to do is to make the testing simpler for your self. After all, your first intuition when producing checks ought to at all times be to attempt to automate them totally so that you simply don’t must ever contact them your self, and the AI at all times runs them routinely. Nevertheless, realistically, you must check it lots your self as effectively.
My primary trick to make testing simpler is to make use of visible testing. For instance, if I’ve the AI resolve quite a lot of duties for me, I first make it create an HTML report consisting of every activity and a checkbox beside these duties so I can test off any duties which can be set to achieved. I additionally inform the AI to offer me with hyperlinks to the pages that include the content material I want to check and the outline of precisely how I can check that it really works. This simplifies the method lots as a result of I don’t have to recollect all the things I want to check and methods to check it. However it’s consciously introduced to me in a report. You may see an instance of this under:

One other level in how I make testing simpler is that I attempt to outsource as many duties as attainable to the coding agent. For instance, if I want explicit information to check one thing manually, I don’t spend quite a lot of time manually in search of the info. I ask the coding agent to entry the required sources and discover me the info routinely.
Conclusion
On this article, I’ve mentioned how one can automate testing with Claude Code to turn into far simpler with Claude Code or some other coding agent that you simply’re utilizing. I primarily mentioned how one can both automate testing, which is probably the most preferable strategy, or you may make guide testing simpler. When coding brokers have turn into pretty much as good as they’ve come, particularly after the discharge of the newest Opus fashions, I consider testing has turn into the bottleneck. Whereas beforehand you spent probably the most time manually writing code, you don’t spend that a lot time manually writing code anymore, and also you spend far more time testing the precise implementations. Thus, it is smart to attempt to optimize the testing course of to make it simpler. To maximise your effectivity as a programmer, I’d positively give attention to the testing half and take into consideration how one can turn into simpler there. The methods I introduced on this article are just a few examples of what I do personally to make testing simpler.
👋 Get in Contact
👉 My free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day Electronic mail Course)
📚 Get my free Imaginative and prescient Language Fashions book
💻 My webinar on Imaginative and prescient Language Fashions
👉 Discover me on socials:
💌 Substack
🐦 X / Twitter
Additionally, take a look at my article on Tips on how to Maximize Claude Cowork.



