How to Run End-to-End Tests with Claude Code

like the Claude Code can be used for a variety of tasks. The first task you might think of is using code.
However, there are many other functions that you can use it for. You can use them to analyze documents, navigate your computer, use a browser, do spreadsheet calculations, and so on. My point is that coding agents can be used to perform all tasks on your computer. The task I will do today is to do the end of the year exams with Claude Code.
An end-to-end test is basically a test where you make a coding agent open a browser and click on it and test its overall usage. Thus, another testing system can be unit testing or integration testing.
end-to-end testing is good because it tests the application as the user would use the application, which ensures that you can properly test the application and find problems that the user might encounter.
Why conduct end-of-year exams with Claude Code
First, I would like to cover why you should care about this topic. The reason you do year-end exams with Claude Code is that it's an effective way to test your code usage. After the coding agents became extremely powerful, especially after the release of Claude Opus 4.5, the new bottleneck that appeared was the inspection of the code used.
Before coding agents, the bottleneck was generating too much code because it took a developer too much time to generate code to implement a bug fix or implement a new feature. However, this has changed now that we have coding agents because they are very efficient at implementing new code.
The new bottle now checks the code. You also don't want to manually test all the code used by the scripting agents, which is why you should use end-to-end testing. This actually causes the code agent to fully test its code before you confirm the job.
Doing year-end tests is very powerful, and basically gives models a way to validate their work, which is extremely powerful and makes them more likely to use one shot, which will save you a lot of time as a developer.
How to run end of year exams with Claude Code
Now it's time to discuss how end-to-end tests can actually be done. The good thing about coding agents is that you can use them to set up a final test.
In short, what you need to do to run end-to-end testing is to have a code agent and give that code agent access to the browser and login to the tool you're testing.
Once you have done this, you can simply ask the code agent to perform an end-to-end test before considering the work done. This end-to-end testing is very simple, but there are many ways to improve end-to-end testing both to make it more efficient and to make agents better at performing end-to-end testing.
So, I will cover the different techniques I use to test the final test with Claude Code that made my final test more successful.
I'll also discuss different situations where you might want to do a final check. For example, you might want to run:
- After creating a new feature
- after solving the error
- in the daily process of checking that everything in the application is working as expected
My end-to-end test information
First, I'll include the information I use to perform final testing (and, in general, the information I use to ensure that 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 alert I use to get dev stuff. So, basically, I'm defining a function in Claude Code. Then I run the slash command with the command you see above.
To make it very easy to write this full notice every time, I use the FluidVoice transcription tool, and say “full integration test”. I then set up word replacement so that FluidVoice will automatically replace the three words for the full prompt above. This makes it very easy for me to always encourage my agents to run a complete end-to-end test.
Author of MCP
First, with Claude Code, they have a built-in Chrome MCP that you can use to give Claude access to Chrome, and it can access the browser. However, I personally prefer Playwright MCP because I believe it makes the agent perform better when interacting with the browser. To install Playwright MCP, you can simply tell 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 communicate with the browser.
It's also important to note that there are many tools out there that you can use to interact with the browser, and that Playwright MCP is just the tool that I use every day.
Command / goal
The slash goal command is also very powerful. Basically, the slash goal command is the command I discussed earlier, but it's a command where you set a goal, and the agent continues until it reaches that goal. If the agent stops at any point, there is an automatic hook that triggers, prompting the agent to analyze whether it has achieved its objective. And if it has achieved it, it stops, yes, but if it has not achieved it, it continues until it reaches its goal. It is actually a very good way to keep the agent working until it reaches the final goal.
End-to-end testing with/goal is very powerful. The reason is that you can use the command to ensure that the agent continues until it successfully executes what you specify, but it also makes it much easier for the agent to validate its work and ensure that it has actually accomplished the goal.
Therefore, combining end-to-end testing with command is a very powerful method that you can use to greatly increase the performance and productivity of your coding agents.
It uses the final test with OpenClaw
The situation I described above is when I run a complete end-to-end test after doing my own implementation with Claude Code; However, you may also have multiple OpenClaw agents running. This can also implement a complete end-to-end test.
One specific thing you can set up is to have the OpenClaw agent trigger once a day or several times a day to test your production application endpoint. This test should go through the entire application, use different features, and make sure they all work as expected, which will help you uncover more bugs.
Because you're running this on a schedule, you'll catch many bugs before users do, which is something you should always strive for.
You can also schedule this using the cron job on your computer or the schedule function in Claude Code. However, I found that setting up an OpenClaw agent to do this last check works very well. It can update the test program whenever I update the application and automatically fix the problems detected by the OpenClaw agent.
The conclusion
In this article, I have discussed how to run a comprehensive end-to-end test. This is the method where you run the code agent through the browser to check the implementation that you are using. Final testing is very powerful because it detects the application just like a user would, and it helps you find many bugs. I believe that end-to-end testing, and in general, validation is very important when it comes to doing good with coding agents, and it's something you should always set up to make it easy for your coding agent to perform full end-to-end tests. You should also schedule them to catch problems before your users do.
👋 Touch
👉 My Free eBook and Webinar:
🚀 10x Your Engineering with LLMs (Free 3-Day Email Course)
📚 Get my free ebook Vision Language Models
💻 My webinar on Vision Language Models
👉 Find me on social media:
💌 Stack
🐦 X / Twitter



