like Claude Code can be used for a wide variety of tasks. The number one task you might think of is to actually implement code.
However, there are also so many other tasks that you can use them for. You can use them to analyze documents, navigate your computer, use the browser, perform spreadsheet calculations, and so on. My point is that coding agents can basically be used to perform all tasks on your computer. The task I’ll cover today is running end-to-end tests with Claude Code.
End-to-end tests are basically tests where you make the coding agent open a browser and click through it and test its implementations completely. In that way, an alternative testing scheme could be unit tests or integration tests.
end-to-end tests are great because they test the application just like how a user would use the application, which ensures that you are able to properly test the application and discover issues that the user might experience.

This infographic highlights the main contents of this article. I’ll discuss how to run end-to-end tests with Claude Code, why you should be running end-to-end tests, and specific techniques you can use to make end-to-end testing effective. Image by ChatGPT.
First of all, I’d like to cover why you should care about this topic. The reason you should run end-to-end tests with Claude Code is simply that it’s an effective way of testing your code implementations. After coding agents became extremely powerful, most notably after the release of Claude Opus 4.5, a new bottleneck that arose was testing the code that’s been implemented.
Before coding agents, the bottleneck was mostly producing the code because it took an engineer a large amount of time to produce the code to either implement a bug fix or implement a new feature. However, this has shifted now that we have coding agents because they’re so effective at implementing new code.
The new bottleneck now is basically testing the code. And you don’t want to be manually testing all the code that coding agents implement, which is why you should be using end-to-end tests. This is basically making the coding agent fully test its own code before you verify the work.
Running end-to-end tests is super powerful, and it basically gives the models a way to verify their own work, which is extremely powerful and makes them more likely to do one-shot implementations, which will save you a lot of time as an engineer.
Now it’s time to discuss how to actually run end-to-end tests. The good thing about coding agents is that you can use them to also set up end-to-end testing.
In short, all you’re gonna do to run end-to-end tests is basically to have a coding agent and give that coding agent access to the browser and also login access to the tool that you’re testing.
Once you’ve done this, you can simply ask the coding agent to perform end-to-end tests before considering a task is done. This end-to-end testing is super simple, but there are a lot of ways to optimize end-to-end testing both to make it more effective and make the agents better at performing the end-to-end testing.
Thus, I’ll cover some different techniques I use to run end-to-end testing with Claude Code that make my end-to-end testing more effective.
I’ll also discuss some different situations where you might want to run end-to-end testing. For example, you might want to run it:
First of all, I’ll cover the prompt I use to perform end-to-end testing (and, in general, the prompt I use to ensure my coding agents have completed their work successfully).
Implement everything I asked for. Verify it end to end by clicking through
the browser using the Playwright MCP. It's not acceptable to test the
application only through integration tests. You need to actually click
around the app. Continue like this until it works. Fix any issues if you
encounter them then do an end to end test again. Run codex exec and run the
review skill with codex and make him approve it and iterate until codex
has approved it. When codex has approved it, get this to dev, and then
test end to end in dev again. Continue until its running fine in dev.
This is the daily prompt I use to get stuff to dev. So essentially, I explain a task to Claude Code. Then I run slash goal with the prompt that you see above.
To make it super simple to write out this full prompt every time, I use the FluidVoice transcription tool, and I then say “complete merge test”. I then set up word replacement so that FluidVoice automatically swaps out the three words for the full prompt above. This makes it super simple for me to constantly prompt my agents to run the full end-to-end test.
First of all, with Claude Code, they have a built-in Chrome MCP you can use to give Claude access to Chrome, and it can thus access the browser. However, I personally prefer the Playwright MCP because I believe that it makes the agent perform better when interacting with the browser. To install the Playwright MCP, you can simply prompt Claude Code to install it for you. Restart the Claude Code session, and it will have access to the Playwright MCP, which you can use to interact with the browser.
It’s also worth noting that there are a lot of tools out there that you can use to interact with the browser, and that Playwright MCP is simply the tool that I’m using on a daily basis.
The slash goal command is also extremely powerful. Basically, the slash goal command is a command that I’ve discussed before as well, but it’s a command where you set a goal, and the agent continues until it achieves that goal. If the agent stops at any point, there’s an automatic hook that triggers, which prompts the agent to analyze if it achieved its goal. And if it achieved it, it stops, of course, but if it didn’t achieve it, it continues until it achieves its goal. It’s basically a very good way to make the agent continue working until it reaches a final objective.
End-to-end testing with /goal is extremely powerful. The reason is that you can use the command to ensure the agent continues until successfully implementing what you specify, but it also makes it much easier for the agent to verify its own work and to ensure it actually achieved the goal.
Thus, combining end-to-end testing with the command is a very powerful technique that you can use to vastly increase the usefulness and productivity of your coding agents
The situation I described above is when I run the full end-to-end testing after performing my own implementations with Claude Code; however, you might also have a lot of OpenClaw agents running. This can also make use of the full end-to-end testing.
One specific thing you can set up is to have an OpenClaw agent trigger once a day or several times a day an end-to-end test of your production application. This testing should go through the entire application, use the different features, and make sure all of them work as expected, which will help you uncover a lot of bugs.
Because you trigger this on a schedule, you’ll find a lot of bugs before users discover them, which is of course something you should always strive for.
You can also set this up using a cron job on your computer or the schedule functionality in Claude Code. However, I found that setting up an OpenClaw agent to perform this end-to-end testing works very well. It can update the testing scheme whenever I update the application and automatically fix the issues that the OpenClaw agent discovers.
In this article, I discussed how you can run full end-to-end testing. This is basically a technique where you make a coding agent go through the browser to test the implementations that it implements. End-to-end testing is extremely powerful because it experiences the application just like a user would, and it thus helps you discover a lot of bugs. I believe end-to-end testing and, in general, verifiability is extremely important when it comes to making the most out of coding agents, and it’s something you should always set up so that it’s simple for your coding agent to run full end-to-end tests. You should also set them up on a schedule so that you discover issues before your users do.
👉 My free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day Email Course)
📚 Get my free Vision Language Models ebook
💻 My webinar on Vision Language Models
👉 Find me on socials:
💌 Substack