Automated end-to-end tests are often seen as a necessary evil. A common example is Selenium-based browser tests. This kind of testing has many drawbacks: 1) They take a long time to run. 2) They require complicated setup. 3) They are fragile. But it doesn't have to be like that!
In this talk I describe how we can write automated end-to-end tests that are 1) Superfast. 2) As easy to setup as unit tests. 3) As robust as unit tests.
This technique is leveraging existing unit testing techniques. Tests for lower layers (such as server code) is instrumented to record all requests and responses in a log file. Tests for higher layers (like client code) is extended with an mocking layer that automatically configures with the contents of that log file.
It is then possible to run a almost a hundred end-to-end tests every second.