Coding agents are incredible at writing code; however, they inevitably make mistakes. They overlook some piece of information or write convoluted code that leads to unexpected side effects. This is exactly the scenario where end-to-end tests are super useful.
They don't rely on which code you ran or built, or similar; they just run the application itself, the end product that the user actually sees. This enables a robust testing system that discovers issues in the way users would experience them and helps prevent users from seeing those issues by fixing them before discovery. End-to-end tests are tests where an AI clicks through an application just as a user would.
It sees a particular screen, decides which button to click, and clicks that button to see what is on the next page. It can then let you know if it experiences an error after clicking a button, nothing happens after clicking a button, or in general that the expected action does not occur. Previously, it used to be so that you had to make these end-to-end tests manually, which was very tedious grunt work.
Essentially, you would have to, when setting up an end-to-end test, go through each page manually and give the test the ID of the button it had to click. You also had to note down what the expected outcome was of clicking that button or performing that action on a particular page. This was naturally very tedious to set up initially because you had to go through every page, find the ID of the button you wanted to click, and so on.
Even worse, however, was that these end-to-end tests had to be maintained. That means if you change the design of a page, change some logic, etc., the end-to-end tests would have to be updated, meaning having an end-to-end test would have a pretty severe maintenance cost. Luckily, with coding agents, the game has completely changed, and end-to-end tests are much faster to build and much easier to maintain.
An end-to-end test is now essentially just an agent with a computer or with a browser access and a mandate/plan for what it should do.
Source: Towards Data Science · Summarized by HeadlinesBriefing